From b7083ab811e667a01025ad4f8a74c8a349d3c9b0 Mon Sep 17 00:00:00 2001 From: Lbqds Date: Mon, 11 Dec 2023 09:25:48 +0000 Subject: [PATCH] deploy: c19a91d85391169abc99f2b8458cd398a234095b --- asset-manifest.json | 6 +- index.html | 2 +- static/js/main.646034fe.js | 1428 +++++++++++++++++ ...CENSE.txt => main.646034fe.js.LICENSE.txt} | 0 ...n.b3eb4cc2.js.map => main.646034fe.js.map} | 2 +- static/js/main.b3eb4cc2.js | 1426 ---------------- 6 files changed, 1433 insertions(+), 1431 deletions(-) create mode 100644 static/js/main.646034fe.js rename static/js/{main.b3eb4cc2.js.LICENSE.txt => main.646034fe.js.LICENSE.txt} (100%) rename static/js/{main.b3eb4cc2.js.map => main.646034fe.js.map} (54%) delete mode 100644 static/js/main.b3eb4cc2.js diff --git a/asset-manifest.json b/asset-manifest.json index 1452e0e..47bdd2e 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,14 +1,14 @@ { "files": { "main.css": "/alephium-dex/static/css/main.26dbe6de.css", - "main.js": "/alephium-dex/static/js/main.b3eb4cc2.js", + "main.js": "/alephium-dex/static/js/main.646034fe.js", "static/media/alephium.svg": "/alephium-dex/static/media/alephium.f7633ed3a80bb58caa3bdea7a1d4d96f.svg", "index.html": "/alephium-dex/index.html", "main.26dbe6de.css.map": "/alephium-dex/static/css/main.26dbe6de.css.map", - "main.b3eb4cc2.js.map": "/alephium-dex/static/js/main.b3eb4cc2.js.map" + "main.646034fe.js.map": "/alephium-dex/static/js/main.646034fe.js.map" }, "entrypoints": [ "static/css/main.26dbe6de.css", - "static/js/main.b3eb4cc2.js" + "static/js/main.646034fe.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index e473195..0f61ae0 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Alephium DEX
\ No newline at end of file +Alephium DEX
\ No newline at end of file diff --git a/static/js/main.646034fe.js b/static/js/main.646034fe.js new file mode 100644 index 0000000..e8af13b --- /dev/null +++ b/static/js/main.646034fe.js @@ -0,0 +1,1428 @@ +/*! For license information please see main.646034fe.js.LICENSE.txt */ +(()=>{var e={69937:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ReactComponent:()=>a,default:()=>s});var n=r(83358);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{COLORS:()=>o,theme:()=>a});var n=r(27930),i=r(77166);const o={blue:"#1975e6",blueWithTransparency:"rgba(25, 117, 230, 0.8)",gray:"#4e4e54",green:"#0ac2af",greenWithTransparency:"rgba(10, 194, 175, 0.8)",lightGreen:"rgba(51, 242, 223, 1)",lightBlue:"#83b9fc",nearBlack:"#000008",nearBlackWithMinorTransparency:"rgba(0,0,0,.70)",red:"#aa0818",darkRed:"#810612"},a=(0,n.Z)((0,i.Z)({palette:{type:"dark",background:{default:o.nearBlack,paper:o.nearBlack},divider:o.gray,text:{primary:"rgba(255,255,255,0.98)"},primary:{main:o.blueWithTransparency,light:o.lightBlue},secondary:{main:o.greenWithTransparency,light:o.lightGreen},error:{main:o.red}},typography:{fontFamily:"'Sora', sans-serif",h1:{fontWeight:"200"},h2:{fontWeight:"200"},h4:{fontWeight:"500"}},overrides:{MuiCssBaseline:{"@global":{"*":{scrollbarWidth:"thin",scrollbarColor:`${o.gray} ${o.nearBlackWithMinorTransparency}`},"*::-webkit-scrollbar":{width:"8px",height:"8px",backgroundColor:o.nearBlackWithMinorTransparency},"*::-webkit-scrollbar-thumb":{backgroundColor:o.gray,borderRadius:"4px"},"*::-webkit-scrollbar-corner":{backgroundColor:"transparent"}}},MuiAccordion:{root:{backgroundColor:o.nearBlackWithMinorTransparency,"&:before":{display:"none"}},rounded:{"&:first-child":{borderTopLeftRadius:"16px",borderTopRightRadius:"16px"},"&:last-child":{borderBottomLeftRadius:"16px",borderBottomRightRadius:"16px"}}},MuiAlert:{root:{borderRadius:"8px",border:"1px solid"}},MuiButton:{root:{borderRadius:"5px",textTransform:"none"}},MuiLink:{root:{color:o.lightBlue}},MuiPaper:{rounded:{borderRadius:"16px"}},MuiStepper:{root:{backgroundColor:"transparent",padding:0}},MuiStep:{root:{backgroundColor:o.nearBlackWithMinorTransparency,borderRadius:"16px",padding:16}},MuiStepConnector:{lineVertical:{borderLeftWidth:0}},MuiStepContent:{root:{borderLeftWidth:0}},MuiStepLabel:{label:{fontSize:16,fontWeight:"300","&.MuiStepLabel-active":{fontWeight:"300"},"&.MuiStepLabel-completed":{fontWeight:"300"}}},MuiTab:{root:{fontSize:18,fontWeight:"300",padding:12,textTransform:"none"}}}}))},46889:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(36664),a=n(r(31044)),s=r(83358),c=n(r(90247)),l=n(r(31441)),u=n(r(3350)),d=r(11039),f=r(81541),h=r(28330),p=r(97306),m=r(88587),g=r(46031),v=r(37392),y=r(5236),b=r(6692),w=r(63416),x=r(70899),_=r(54021),E=r(19628),k=r(48777);function S(e){let{details:t,slippage:r}=e;if(void 0===t)return null;const{state:n,tokenAId:a,shareAmount:s,sharePercentage:c,amountA:l,amountB:u}=t,[f,h]=a===n.token0Info.id?[{info:n.token0Info,amount:l},{info:n.token1Info,amount:u}]:[{info:n.token1Info,amount:l},{info:n.token0Info,amount:u}];return(0,i.jsx)(o.Card,{variant:"outlined",style:{width:"100%",padding:"0",borderRadius:"10px"},children:(0,i.jsxs)("div",{style:{display:"grid",gridAutoRows:"auto",gridRowGap:"5px",paddingTop:"10px",paddingBottom:"10px"},children:[(0,i.jsx)(E.DetailItem,{itemName:"Liquidity token amount:",itemValue:`${(0,d.bigIntToString)(s,d.PairTokenDecimals)}`}),(0,i.jsx)(E.DetailItem,{itemName:"Share percentage:",itemValue:`${c} %`}),(0,i.jsx)(E.DetailItem,{itemName:`Minimal amount of ${f.info.symbol} after slippage:`,itemValue:`${(0,d.bigIntToString)((0,d.minimalAmount)(f.amount,r),f.info.decimals)} ${f.info.symbol}`}),(0,i.jsx)(E.DetailItem,{itemName:`Minimal amount of ${h.info.symbol} after slippage:`,itemValue:`${(0,d.bigIntToString)((0,d.minimalAmount)(h.amount,r),h.info.decimals)} ${h.info.symbol}`})]})})}t.default=function(){const e=(0,w.commonStyles)(),[t,r]=(0,s.useState)(void 0),[n,E]=(0,s.useState)(!1),[A]=(0,h.useSlippageTolerance)(),[M]=(0,p.useDeadline)(),C=(0,g.useDispatch)(),[I,T]=(0,s.useState)(void 0),{signer:P,account:O,connectionStatus:R,explorerProvider:N}=(0,k.useWallet)(),{balance:B,updateBalanceForTx:L}=(0,f.useAvailableBalances)(),j=(0,x.useHistory)(),D=(0,s.useCallback)((e=>{C((0,v.selectTokenA)(e))}),[C]),F=(0,s.useCallback)((e=>{C((0,v.selectTokenB)(e))}),[C]),{tokenAInfo:U,tokenBInfo:z}=(0,g.useSelector)(b.selectMintState),{tokenAInput:Z,tokenBInput:q,tokenAAmount:H,tokenBAmount:V,tokenPairState:W,addLiquidityDetails:$}=(0,y.useDerivedMintInfo)(T),K=(0,s.useCallback)((e=>{const t=void 0!==W&&W.reserve0>0n;C((0,v.typeInput)({type:"TokenA",value:e.target.value,hasLiquidity:t}))}),[C,W]),G=(0,s.useCallback)((e=>{const t=void 0!==W&&W.reserve0>0n;C((0,v.typeInput)({type:"TokenB",value:e.target.value,hasLiquidity:t}))}),[C,W]),Y=(0,s.useMemo)((()=>void 0!==t),[t]),J=(0,s.useCallback)((()=>{C((0,v.reset)()),r(void 0),E(!1),T(void 0),j.push("/swap")}),[j]),X=(0,s.useMemo)((()=>(0,d.tryGetBalance)(B,U)),[B,U]),Q=(0,s.useMemo)((()=>(0,d.tryGetBalance)(B,z)),[B,z]),ee=(0,i.jsxs)("div",{className:e.tokenContainerWithBalance,children:[(0,i.jsxs)("div",{className:e.inputRow,children:[(0,i.jsx)(l.default,{tokenId:null===U||void 0===U?void 0:U.id,counterpart:null===z||void 0===z?void 0:z.id,onChange:D,tokenBalances:B,style2:!0}),(0,i.jsx)(u.default,{className:e.numberField,value:void 0!==Z?Z:"",onChange:K,autoFocus:!0,InputProps:{disableUnderline:!0},disabled:!!n||!!Y})]}),X?(0,i.jsxs)(o.Typography,{className:e.balance,children:["Balance: ",X]}):null]}),te=(0,i.jsxs)("div",{className:e.tokenContainerWithBalance,children:[(0,i.jsxs)("div",{className:e.inputRow,children:[(0,i.jsx)(l.default,{tokenId:null===z||void 0===z?void 0:z.id,counterpart:null===U||void 0===U?void 0:U.id,onChange:F,tokenBalances:B}),(0,i.jsx)(u.default,{className:e.numberField,value:void 0!==q?q:"",onChange:G,InputProps:{disableUnderline:!0},disabled:!!n||!!Y})]}),Q?(0,i.jsxs)(o.Typography,{className:e.balance,children:["Balance: ",Q]}):null]}),re=(0,s.useCallback)((async()=>{try{if(E(!0),"connected"===R&&void 0!==N&&void 0!==W&&void 0!==U&&void 0!==z&&void 0!==H&&void 0!==V){const e=await(0,d.addLiquidity)(B,P,N,O.address,W,U,z,H,V,"auto"===A?m.DEFAULT_SLIPPAGE:A,M);console.log(`add liquidity succeed, tx id: ${e.txId}`),r(e.txId),L(e.txId),E(!1)}}catch(I){T(`${I}`),E(!1),console.error(`failed to add liquidity, error: ${I}`)}}),[R,N,P,O,W,U,z,H,V,A,M,B,L]),ne="connected"===R&&void 0!==U&&void 0!==z&&void 0!==H&&void 0!==V&&!n&&!Y&&void 0===I,ie=(0,i.jsx)(c.default,{disabled:!ne,onClick:re,className:e.gradientButton+(ne?"":" "+e.disabled),children:"Add Liquidity"});return(0,i.jsxs)(o.Container,{className:e.centeredContainer,maxWidth:"sm",children:[(0,i.jsx)("div",{className:e.titleBar}),(0,i.jsx)(o.Typography,{variant:"h4",color:"textSecondary",children:"Add Liquidity"}),(0,i.jsx)("div",{className:e.spacer}),(0,i.jsxs)(o.Paper,{className:e.mainPaper,children:[(0,i.jsx)(_.WaitingForTxSubmission,{open:!!n&&!Y,text:"Adding Liquidity"}),(0,i.jsx)(_.TransactionSubmitted,{open:!!Y,txId:t,buttonText:"Swap Coins",onClick:J}),"connected"!==R?(0,i.jsx)("div",{children:(0,i.jsx)(o.Typography,{variant:"h6",color:"error",className:e.error,children:"Your wallet is not connected"})}):null,(0,i.jsx)("div",{children:(0,i.jsxs)(a.default,{in:!n&&!Y&&"connected"===R,children:[(0,i.jsxs)(i.Fragment,{children:[ee,(0,i.jsx)("div",{className:e.spacer}),te,I?(0,i.jsx)(o.Typography,{variant:"body2",color:"error",className:e.error,children:I}):null,(0,i.jsx)("div",{className:e.spacer})]}),(0,i.jsx)(S,{details:$,slippage:"auto"===A?m.DEFAULT_SLIPPAGE:A}),ie]})})]}),(0,i.jsx)("div",{className:e.spacer})]})}},91697:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(36664),a=n(r(31044)),s=r(83358),c=n(r(90247)),l=r(11039),u=r(81541),d=r(63416),f=n(r(31441)),h=r(70899),p=r(54021),m=r(48777);t.default=function(){const e=(0,d.commonStyles)(),[t,r]=(0,s.useState)(void 0),[n,g]=(0,s.useState)(void 0),[v,y]=(0,s.useState)(void 0),[b,w]=(0,s.useState)(!1),[x,_]=(0,s.useState)(void 0),{account:E,signer:k,connectionStatus:S,nodeProvider:A,explorerProvider:M}=(0,m.useWallet)(),{balance:C,updateBalanceForTx:I}=(0,u.useAvailableBalances)(),T=(0,h.useHistory)();(0,s.useEffect)((()=>{_(void 0),async function(){if(void 0!==t&&void 0!==n&&"connected"===S&&void 0!==A)try{await(0,l.tokenPairExist)(A,t.id,n.id)&&_("token pair already exist")}catch(e){_(`${e}`)}}()}),[t,n,A,S]);const P=(0,s.useCallback)((e=>{r(e)}),[]),O=(0,s.useCallback)((e=>{g(e)}),[]),R=(0,s.useMemo)((()=>void 0!==v),[v]),N=(0,s.useCallback)((()=>{r(void 0),g(void 0),y(void 0),w(!1),_(void 0),T.push("/add-liquidity")}),[T]),B=(0,i.jsxs)("div",{className:e.tokenPairContainer,children:[(0,i.jsx)(f.default,{tokenId:null===t||void 0===t?void 0:t.id,counterpart:null===n||void 0===n?void 0:n.id,onChange:P,tokenBalances:C,mediumSize:!0}),(0,i.jsx)(f.default,{tokenId:null===n||void 0===n?void 0:n.id,counterpart:null===t||void 0===t?void 0:t.id,onChange:O,tokenBalances:C,mediumSize:!0})]}),L=(0,s.useCallback)((async()=>{try{if(w(!0),"connected"===S&&void 0!==M&&void 0!==t&&void 0!==n){const e=await(0,l.createTokenPair)(k,M,E.address,t.id,n.id);console.log(`add pool succeed, tx id: ${e.txId}, token pair id: ${e.tokenPairId}`),y(e.txId),I(e.txId),w(!1)}}catch(x){_(`${x}`),w(!1),console.error(`failed to add pool, error: ${x}`)}}),[k,E,S,M,t,n,I]),j="connected"===S,D=(0,i.jsx)(c.default,{disabled:!j,onClick:L,className:e.gradientButton+(j?"":" "+e.disabled),children:"Add Pool"});return(0,i.jsxs)(o.Container,{className:e.centeredContainer,maxWidth:"sm",children:[(0,i.jsx)("div",{className:e.titleBar}),(0,i.jsx)(o.Typography,{variant:"h4",color:"textSecondary",children:"Add Pool"}),(0,i.jsx)("div",{className:e.spacer}),(0,i.jsxs)(o.Paper,{className:e.mainPaper,children:[(0,i.jsx)(p.WaitingForTxSubmission,{open:!!b&&!R,text:"Adding Pool"}),(0,i.jsx)(p.TransactionSubmitted,{open:!!R,txId:v,buttonText:"Add Liquidity",onClick:N}),"connected"!==S?(0,i.jsx)("div",{children:(0,i.jsx)(o.Typography,{variant:"h6",color:"error",className:e.error,children:"Your wallet is not connected"})}):null,(0,i.jsx)("div",{children:(0,i.jsxs)(a.default,{in:!b&&!R&&"connected"===S,children:[(0,i.jsxs)(i.Fragment,{children:[B,(0,i.jsx)("div",{className:e.spacer}),x?(0,i.jsx)(o.Typography,{variant:"body2",color:"error",className:e.error,children:x}):null,(0,i.jsx)("div",{className:e.spacer})]}),D]})})]}),(0,i.jsx)("div",{className:e.spacer})]})}},90247:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72885),i=r(36664),o=(0,i.makeStyles)((e=>({root:{position:"relative"},button:{marginTop:e.spacing(2),textTransform:"none",width:"100%"},loader:{position:"absolute",bottom:0,left:"50%",marginLeft:-12,marginBottom:6},error:{marginTop:e.spacing(1),textAlign:"center"}})));t.default=function(e){let{disabled:t,onClick:r,showLoader:a,error:s,children:c,className:l}=e;const u=o();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:u.root,children:[(0,n.jsx)(i.Button,{color:"primary",variant:"contained",className:l||u.button,disabled:t,onClick:r,children:c}),a?(0,n.jsx)(i.CircularProgress,{size:24,color:"inherit",className:l||u.loader}):null]}),s?(0,n.jsx)(i.Typography,{color:"error",className:u.error,children:s}):null]})}},61263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72885);r(74451),t.default=function(){return(0,n.jsx)("div",{id:"loaderContainer",children:(0,n.jsx)("div",{id:"circle",children:(0,n.jsx)("div",{id:"inner"})})})}},19628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DetailItem=void 0;const n=r(72885),i=r(36664);t.DetailItem=function(e){let{itemName:t,itemValue:r}=e;return(0,n.jsxs)(i.Box,{pl:1.5,pr:1.5,style:{justifyContent:"space-between",display:"flex",flexWrap:"wrap",width:"100%",alignItems:"center"},children:[(0,n.jsx)("div",{style:{fontWeight:"400",fontSize:"14",display:"flex",textAlign:"left",wordBreak:"break-word",overflowWrap:"break-word",maxWidth:"50%"},children:t}),(0,n.jsx)("div",{style:{fontWeight:"400",fontSize:"14",textAlign:"right",wordBreak:"break-word",overflowWrap:"break-word",maxWidth:"50%"},children:r})]})}},55365:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(36664),a=n(r(60840)),s=n(r(80524)),c=r(83358);t.default=function(e){let{onClick:t}=e;const[r,n]=(0,c.useState)(!1),l=(0,c.useCallback)((()=>{n(!0)}),[]),u=(0,c.useCallback)((()=>{n(!1)}),[]);return(0,i.jsx)(o.IconButton,{onClick:t,onMouseOver:l,onMouseOut:u,children:r?(0,i.jsx)(s.default,{fontSize:"medium"}):(0,i.jsx)(a.default,{fontSize:"medium"})})}},86078:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MyDialog=void 0;const n=r(72885),i=r(36664);t.MyDialog=function(e){return(0,n.jsx)(i.Dialog,{...e,BackdropProps:{style:{backgroundColor:"rgb(10,10,10,0.7)"}},PaperProps:{style:{backgroundColor:"rgb(43, 43, 43)",borderRadius:20}},children:e.children})}},3350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72885),i=r(36664),o=r(83358),a=r(11039);t.default=function(e){let{...t}=e;const r=(0,o.useCallback)((e=>{var r;a.NumberRegex.test(e.target.value)&&(null===(r=t.onChange)||void 0===r||r.call(t,e))}),[t]);return(0,n.jsx)(i.TextField,{type:"text",...t,InputProps:{...(null===t||void 0===t?void 0:t.InputProps)||{}},onChange:r})}},1924:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(36664),a=n(r(31044)),s=r(83358),c=r(11039),l=r(63416),u=r(93218),d=n(r(31441)),f=r(81541),h=r(19628),p=n(r(22976)),m=r(48777);function g(e){var t;let{state:r,balance:n}=e;if(void 0===r)return null;const a=null!==(t=n.get(r.tokenPairId))&&void 0!==t?t:0n,s=(0,p.default)((100n*a).toString()).div((0,p.default)(r.totalSupply.toString())).toFixed(5);return(0,i.jsx)(o.Card,{variant:"outlined",style:{width:"100%",padding:"0",borderRadius:"10px"},children:(0,i.jsxs)("div",{style:{display:"grid",gridAutoRows:"auto",gridRowGap:"5px",paddingTop:"10px",paddingBottom:"10px"},children:[(0,i.jsx)(h.DetailItem,{itemName:`Pooled ${r.token0Info.symbol}:`,itemValue:`${(0,c.bigIntToString)(r.reserve0,r.token0Info.decimals)} ${r.token0Info.symbol}`}),(0,i.jsx)(h.DetailItem,{itemName:`Pooled ${r.token1Info.symbol}:`,itemValue:`${(0,c.bigIntToString)(r.reserve1,r.token1Info.decimals)} ${r.token1Info.symbol}`}),(0,i.jsx)(h.DetailItem,{itemName:"Liquidity token total supply:",itemValue:`${(0,c.bigIntToString)(r.totalSupply,c.PairTokenDecimals)}`}),(0,i.jsx)(h.DetailItem,{itemName:"Your total pool tokens:",itemValue:`${(0,c.bigIntToString)(a,c.PairTokenDecimals)}`}),(0,i.jsx)(h.DetailItem,{itemName:"Your pool share:",itemValue:0n===r.totalSupply?"0 %":`${parseFloat(s)} %`})]})})}t.default=function(){const e=(0,l.commonStyles)(),[t,r]=(0,s.useState)(void 0),[n,c]=(0,s.useState)(void 0),{tokenPairState:h,getTokenPairStateError:p}=(0,u.useTokenPairState)(t,n),{connectionStatus:v}=(0,m.useWallet)(),{balance:y}=(0,f.useAvailableBalances)(),b=(0,s.useCallback)((e=>{r(e)}),[]),w=(0,s.useCallback)((e=>{c(e)}),[]),x=(0,i.jsxs)("div",{className:e.tokenPairContainer,children:[(0,i.jsx)(d.default,{tokenId:null===t||void 0===t?void 0:t.id,counterpart:null===n||void 0===n?void 0:n.id,onChange:b,tokenBalances:y,mediumSize:!0}),(0,i.jsx)(d.default,{tokenId:null===n||void 0===n?void 0:n.id,counterpart:null===t||void 0===t?void 0:t.id,onChange:w,tokenBalances:y,mediumSize:!0})]});return(0,i.jsxs)(o.Container,{className:e.centeredContainer,maxWidth:"sm",children:[(0,i.jsx)("div",{className:e.titleBar}),(0,i.jsx)(o.Typography,{variant:"h4",color:"textSecondary",children:"Pool"}),(0,i.jsx)("div",{className:e.spacer}),(0,i.jsx)(o.Paper,{className:e.mainPaper,children:(0,i.jsxs)("div",{children:["connected"!==v?(0,i.jsx)("div",{children:(0,i.jsx)(o.Typography,{variant:"h6",color:"error",className:e.error,children:"Your wallet is not connected"})}):null,(0,i.jsx)(a.default,{in:"connected"===v,children:(0,i.jsxs)(i.Fragment,{children:[x,(0,i.jsx)("div",{className:e.spacer}),(0,i.jsx)("div",{className:e.spacer}),p?(0,i.jsx)(o.Typography,{variant:"body2",color:"error",className:e.error,children:p}):(0,i.jsx)(g,{state:h,balance:y})]})})]})})]})}},70482:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(36664),a=n(r(31044)),s=r(83358),c=n(r(90247)),l=n(r(31441)),u=n(r(3350)),d=r(11039),f=r(48124),h=r(81541),p=r(28330),m=r(97306),g=r(88587),v=r(63416),y=r(93218),b=r(54021),w=r(19628),x=r(70899),_=r(48777);function E(e){let{details:t,amount:r}=e;if(void 0===t||void 0===r)return null;const{state:n,remainShareAmount:a,remainSharePercentage:s}=t,c=e=>{const r=e.id===t.token0Id?t.amount0:t.amount1;return(0,d.bigIntToString)(r,e.decimals)};return(0,i.jsx)(o.Card,{variant:"outlined",style:{width:"100%",padding:"0",borderRadius:"10px"},children:(0,i.jsxs)("div",{style:{display:"grid",gridAutoRows:"auto",gridRowGap:"5px",paddingTop:"10px",paddingBottom:"10px"},children:[(0,i.jsx)(w.DetailItem,{itemName:`The number of ${n.token0Info.symbol} you will receive:`,itemValue:`${c(n.token0Info)} ${n.token0Info.symbol}`}),(0,i.jsx)(w.DetailItem,{itemName:`The number of ${n.token1Info.symbol} you will receive:`,itemValue:`${c(n.token1Info)} ${n.token1Info.symbol}`}),(0,i.jsx)(w.DetailItem,{itemName:"Remain share amount:",itemValue:`${(0,d.bigIntToString)(a,d.PairTokenDecimals)}`}),(0,i.jsx)(w.DetailItem,{itemName:"Remain share percentage:",itemValue:`${s} %`})]})})}t.default=function(){const e=(0,v.commonStyles)(),[t,r]=(0,s.useState)(void 0),[n,w]=(0,s.useState)(void 0),[k,S]=(0,s.useState)(void 0),[A,M]=(0,s.useState)(void 0),[C,I]=(0,s.useState)(void 0),[T,P]=(0,s.useState)(void 0),[O,R]=(0,s.useState)(void 0),[N,B]=(0,s.useState)(!1),[L]=(0,p.useSlippageTolerance)(),[j]=(0,m.useDeadline)(),[D,F]=(0,s.useState)(void 0),{connectionStatus:U,signer:z,account:Z,explorerProvider:q}=(0,_.useWallet)(),{balance:H,updateBalanceForTx:V}=(0,h.useAvailableBalances)(),W=(0,x.useHistory)(),$=(0,s.useCallback)((e=>{S(e)}),[]),K=(0,s.useCallback)((e=>{M(e)}),[]),{tokenPairState:G,getTokenPairStateError:Y}=(0,y.useTokenPairState)(k,A);(0,s.useEffect)((()=>{if(I(void 0),void 0!==G&&void 0===Y){const e=H.get(G.tokenPairId);I(void 0===e?0n:e)}}),[G,Y,H]),(0,s.useEffect)((()=>{P(void 0);try{if(void 0!==G&&void 0!==k&&void 0!==A&&void 0!==n&&void 0!==C){const e=(0,d.getRemoveLiquidityDetails)(G,C,n);P(e)}}catch(D){F(`${D}`),console.error(`failed to update token amounts: ${D}`)}}),[G,k,A,n,C]);const J=(0,s.useCallback)((e=>{if(F(void 0),P(void 0),""===e.target.value)return w(void 0),void r(void 0);r(e.target.value);try{w((0,d.stringToBigInt)(e.target.value,d.PairTokenDecimals))}catch(D){console.log(`Invalid input: ${e.target.value}, error: ${D}`),F(`${D}`)}}),[]),X=(0,s.useCallback)((()=>{S(void 0),M(void 0),w(void 0),r(void 0),I(void 0),R(void 0),B(!1),P(void 0),F(void 0),W.push("/swap")}),[W]),Q=(0,i.jsxs)("div",{className:e.tokenPairContainer,children:[(0,i.jsx)(l.default,{tokenId:null===k||void 0===k?void 0:k.id,counterpart:null===A||void 0===A?void 0:A.id,onChange:$,tokenBalances:H,mediumSize:!0}),(0,i.jsx)(l.default,{tokenId:null===A||void 0===A?void 0:A.id,counterpart:null===k||void 0===k?void 0:k.id,onChange:K,tokenBalances:H,mediumSize:!0})]}),ee=(0,s.useMemo)((()=>void 0!==O),[O]),te=(0,i.jsx)("div",{className:e.tokenContainer,children:(0,i.jsx)(u.default,{className:e.numberField,value:void 0!==t?t:"",onChange:J,autoFocus:!0,InputProps:{disableUnderline:!0},disabled:!!N||!!ee})}),re=(0,s.useCallback)((async()=>{try{if(B(!0),"connected"===U&&void 0!==q&&void 0!==G&&void 0!==T&&void 0!==k&&void 0!==A&&void 0!==n){if(0n===n)throw new Error("the input amount must be greater than 0");const e=await(0,d.removeLiquidity)(z,q,Z.address,G,n,T.amount0,T.amount1,"auto"===L?g.DEFAULT_SLIPPAGE:L,j);console.log(`remove liquidity succeed, tx id: ${e.txId}`),R(e.txId),V(e.txId),B(!1)}}catch(D){F(`${D}`),B(!1),console.error(`failed to remove liquidity, error: ${D}`)}}),[U,z,Z,q,G,k,A,n,T,L,j,V]),ne="connected"===U&&void 0!==k&&void 0!==A&&void 0!==n&&void 0!==C&&void 0!==T&&!N&&!ee&&void 0===D&&void 0===Y,ie=(0,i.jsx)(c.default,{disabled:!ne,onClick:re,className:e.gradientButton+(ne?"":" "+e.disabled),children:"Remove Liquidity"});return(0,i.jsxs)(o.Container,{className:e.centeredContainer,maxWidth:"sm",children:[(0,i.jsx)("div",{className:e.titleBar}),(0,i.jsx)(o.Typography,{variant:"h4",color:"textSecondary",children:"Remove Liquidity"}),(0,i.jsx)("div",{className:e.spacer}),(0,i.jsxs)(o.Paper,{className:e.mainPaper,children:[(0,i.jsx)(b.WaitingForTxSubmission,{open:!!N&&!ee,text:"Removing Liquidity"}),(0,i.jsx)(b.TransactionSubmitted,{open:!!ee,txId:O,buttonText:"Swap Coins",onClick:X}),"connected"!==U?(0,i.jsx)("div",{children:(0,i.jsx)(o.Typography,{variant:"h6",color:"error",className:e.error,children:"Your wallet is not connected"})}):null,(0,i.jsx)("div",{children:(0,i.jsx)(a.default,{in:!N&&!ee&&"connected"===U,children:(0,i.jsxs)(i.Fragment,{children:[Q,(0,i.jsx)("div",{className:e.spacer}),void 0!==C?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:e.notification,children:[(0,i.jsx)("p",{className:e.leftAlign,children:"Total share amount:"}),(0,i.jsx)("p",{className:e.rightAlign,children:(0,f.formatUnits)(C,d.PairTokenDecimals)})]})}):null,te,(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:e.spacer}),void 0===D&&void 0===Y?(0,i.jsx)(E,{details:T,amount:n}):null,D?(0,i.jsx)(o.Typography,{variant:"body2",color:"error",className:e.error,children:D}):Y?(0,i.jsx)(o.Typography,{variant:"body2",color:"error",className:e.error,children:Y}):null]}),(0,i.jsx)("div",{className:e.spacer}),ie]})})})]}),(0,i.jsx)("div",{className:e.spacer})]})}},28238:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(83358),a=r(97306),s=r(28330),c=r(88587),l=n(r(6221)),u=n(r(57643)),d=r(36664),f=n(r(3350)),h=r(86078),p=(0,d.makeStyles)((e=>(0,d.createStyles)({container:{width:380,height:60,display:"flex",alignItems:"center"},error:{marginTop:e.spacing(1),textAlign:"center"}})));function m(){const e=p(),[t,r]=(0,s.useSlippageTolerance)(),[n,l]=(0,a.useDeadline)(),[u,h]=(0,o.useState)(""),[m,v]=(0,o.useState)(!1),[y,b]=(0,o.useState)(""),[w,x]=(0,o.useState)(!1);return(0,i.jsxs)(d.DialogContent,{children:[(0,i.jsxs)(d.Box,{display:"flex",className:e.container,children:[(0,i.jsx)(d.Tooltip,{title:"Your transaction will revert if the price changes unfavorably by more than this percentage.. The default is 0.5%.",children:(0,i.jsx)(d.Typography,{variant:"subtitle2",style:{marginLeft:"30px"},children:"Slippage tolerance"})}),(0,i.jsx)(f.default,{variant:"outlined",size:"small",style:{left:"30px",width:140},inputProps:{style:{height:"20px",color:m?"red":""}},InputProps:{startAdornment:(0,i.jsx)(d.InputAdornment,{position:"start",children:"%"})},placeholder:c.DEFAULT_SLIPPAGE.toString(),value:u.length>0?u:"auto"===t?"":`${t}`,onChange:e=>function(e){if(h(e),v(!1),0!==e.length)try{const t=Number.parseFloat(e);if(0===t)throw new Error("The slipplage cannot be 0");if(t>50)throw new Error("The slippage cannot large than 50%");r(t)}catch(t){console.log(`Invalid slippage input ${e}`),v(`${t}`),r("auto")}else r("auto")}(e.target.value)})]}),(0,i.jsxs)(d.Box,{display:"flex",className:e.container,children:[(0,i.jsx)(d.Tooltip,{title:"Your transaction will revert if it is pending for more than this period of time.",children:(0,i.jsx)(d.Typography,{variant:"subtitle2",style:{marginLeft:"80px"},children:"Deadline"})}),(0,i.jsx)(f.default,{variant:"outlined",size:"small",style:{left:"50px",width:140},inputProps:{style:{height:"20px",color:w?"red":""}},placeholder:c.DEFAULT_DEADLINE_FROM_NOW/60+" minutes",value:y.length>0?y:n===c.DEFAULT_DEADLINE_FROM_NOW?"":(n/60).toString(),onChange:e=>function(e){if(b(e),x(!1),0!==e.length)try{const t=Math.floor(60*Number.parseFloat(e));if(t<60)throw new Error("The deadline cannot less than 1 minutes");if(t>g)throw new Error("The deadline cannot large than 3 days");l(t)}catch(t){console.log(`Invalid deadline input ${e}`),l(c.DEFAULT_DEADLINE_FROM_NOW),x(`${t}`)}else l(c.DEFAULT_DEADLINE_FROM_NOW)}(e.target.value)})]}),m?(0,i.jsx)(d.Typography,{variant:"body2",color:"error",className:e.error,children:m}):null,w?(0,i.jsx)(d.Typography,{variant:"body2",color:"error",className:e.error,children:w}):null]})}const g=259200;t.default=function(){const[e,t]=(0,o.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.default,{"aria-label":"settings",onClick:()=>t(!0),children:(0,i.jsx)(l.default,{})}),(0,i.jsx)(h.MyDialog,{open:e,onClose:()=>t(!1),children:(0,i.jsx)(m,{})})]})}},59462:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(36664),a=n(r(31044)),s=r(83358),c=n(r(90247)),l=n(r(31441)),u=n(r(55365)),d=n(r(3350)),f=r(11039),h=r(81541),p=r(97306),m=r(28330),g=r(88587),v=r(46031),y=r(9753),b=r(64586),w=r(18087),x=r(63416),_=r(54021),E=n(r(22976)),k=r(19628),S=r(48777);function A(e,t,r,n){const i=e*10n**BigInt(n),o=r*10n**BigInt(t),a=(0,E.default)(i.toString()).div((0,E.default)(o.toString())),s=(0,E.default)("0.000001");return a.lt(s)?`< ${s}`:`= ${a.toFixed(6)}`}function M(e){let{swapDetails:t}=e;if(void 0===t)return null;const{swapType:r,state:n,tokenInInfo:a,tokenOutInfo:s,tokenOutAmount:c,maximalTokenInAmount:l,minimalTokenOutAmount:u,priceImpact:d}=t,[[h,p],[m,g]]=n.token0Info.id===a.id?[[n.reserve0,n.token0Info.decimals],[n.reserve1,n.token1Info.decimals]]:[[n.reserve1,n.token1Info.decimals],[n.reserve0,n.token0Info.decimals]];return(0,i.jsx)(o.Card,{variant:"outlined",style:{width:"100%",padding:"0",borderRadius:"10px"},children:(0,i.jsxs)("div",{style:{display:"grid",gridAutoRows:"auto",gridRowGap:"5px",paddingTop:"10px",paddingBottom:"10px"},children:[(0,i.jsx)(k.DetailItem,{itemName:"Price:",itemValue:`1 ${s.symbol} ${A(h,p,m,g)} ${a.symbol}`}),(0,i.jsx)(k.DetailItem,{itemName:"Expected Output:",itemValue:`${(0,f.bigIntToString)(c,s.decimals)} ${s.symbol}`}),(0,i.jsx)(k.DetailItem,{itemName:"Price Impact:",itemValue:`${v=d,v<1e-4?"< 0.0001":v.toFixed(4)} %`}),(0,i.jsx)(k.DetailItem,{itemName:"ExactIn"===r?"Minimal received after slippage:":"Maximum sent after slippage:",itemValue:"ExactIn"===r?`${(0,f.bigIntToString)(u,s.decimals)} ${s.symbol}`:`${(0,f.bigIntToString)(l,a.decimals)} ${a.symbol}`})]})});var v}t.default=function(){const e=(0,x.commonStyles)(),[t,r]=(0,s.useState)(void 0),[n,E]=(0,s.useState)(!1),k=(0,v.useDispatch)(),[A,C]=(0,s.useState)(void 0),[I]=(0,m.useSlippageTolerance)(),[T]=(0,p.useDeadline)(),{connectionStatus:P,signer:O,account:R,explorerProvider:N}=(0,S.useWallet)(),{balance:B,updateBalanceForTx:L}=(0,h.useAvailableBalances)(),j=(0,s.useCallback)((e=>{k((0,y.selectTokenIn)(e))}),[k]),D=(0,s.useCallback)((e=>{k((0,y.selectTokenOut)(e))}),[k]),{tokenInInfo:F,tokenOutInfo:U}=(0,v.useSelector)(w.selectSwapState),{tokenInInput:z,tokenOutInput:Z,tokenInAmount:q,tokenOutAmount:H,tokenPairState:V,swapType:W}=(0,b.useDerivedSwapInfo)(C),$=(0,s.useMemo)((()=>{if(void 0===W||void 0===V||void 0===q||void 0===H||void 0===F||void 0===U)return;const e="auto"===I?g.DEFAULT_SLIPPAGE:I;return(0,f.getSwapDetails)(W,V,F,U,q,H,e)}),[q,H,V,W,F,U,I]),K=(0,s.useCallback)((e=>{k((0,y.typeInput)({type:"TokenIn",value:e.target.value}))}),[k]),G=(0,s.useCallback)((e=>{k((0,y.typeInput)({type:"TokenOut",value:e.target.value}))}),[k]),Y=(0,s.useCallback)((()=>{k((0,y.switchTokens)())}),[k]),J=(0,s.useCallback)((()=>{k((0,y.reset)()),r(void 0),E(!1),C(void 0)}),[k]),X=(0,s.useMemo)((()=>(0,f.tryGetBalance)(B,F)),[B,F]),Q=(0,s.useMemo)((()=>(0,f.tryGetBalance)(B,U)),[B,U]),ee=(0,s.useMemo)((()=>void 0!==t),[t]),te=(0,i.jsxs)("div",{className:e.tokenContainerWithBalance,children:[(0,i.jsxs)("div",{className:e.inputRow,children:[(0,i.jsx)(l.default,{tokenId:null===F||void 0===F?void 0:F.id,counterpart:null===U||void 0===U?void 0:U.id,onChange:j,tokenBalances:B,style2:!0}),(0,i.jsx)(d.default,{className:e.numberField,value:void 0!==z?z:"",onChange:K,autoFocus:!0,InputProps:{disableUnderline:!0},disabled:!!n||!!ee})]}),X?(0,i.jsxs)(o.Typography,{className:e.balance,children:["Balance: ",X]}):null]}),re=(0,i.jsx)(u.default,{onClick:Y}),ne=(0,i.jsxs)("div",{className:e.tokenContainerWithBalance,children:[(0,i.jsxs)("div",{className:e.inputRow,children:[(0,i.jsx)(l.default,{tokenId:null===U||void 0===U?void 0:U.id,counterpart:null===F||void 0===F?void 0:F.id,onChange:D,tokenBalances:B}),(0,i.jsx)(d.default,{className:e.numberField,value:void 0!==Z?Z:"",onChange:G,InputProps:{disableUnderline:!0},disabled:!!n||!!ee})]}),Q?(0,i.jsxs)(o.Typography,{className:e.balance,children:["Balance: ",Q]}):null]}),ie=(0,s.useCallback)((async()=>{try{if(E(!0),"connected"===P&&void 0!==N&&void 0!==$){const e=await(0,f.swap)($,B,O,N,R.address,T);console.log(`swap tx submitted, tx id: ${e.txId}`),r(e.txId),L(e.txId),E(!1)}}catch(A){C(`${A}`),E(!1),console.error(`failed to swap, error: ${A}`)}}),[P,R,N,O,$,I,T,B,L]),oe="connected"===P&&!n&&!ee&&void 0===A&&void 0!==$,ae=(0,i.jsx)(c.default,{disabled:!oe,onClick:ie,className:e.gradientButton+(oe?"":" "+e.disabled),children:"Swap"});return(0,i.jsxs)(o.Container,{className:e.centeredContainer,maxWidth:"sm",children:[(0,i.jsx)("div",{className:e.titleBar}),(0,i.jsx)(o.Typography,{variant:"h4",color:"textSecondary",children:"Swap"}),(0,i.jsx)("div",{className:e.spacer}),(0,i.jsxs)(o.Paper,{className:e.mainPaper,children:[(0,i.jsx)(_.WaitingForTxSubmission,{open:!!n&&!ee,text:"Swapping"}),(0,i.jsx)(_.TransactionSubmitted,{open:!!ee,txId:t,buttonText:"Swap More Coins",onClick:J}),"connected"!==P?(0,i.jsx)("div",{children:(0,i.jsx)(o.Typography,{variant:"h6",color:"error",className:e.error,children:"Your wallet is not connected"})}):null,(0,i.jsx)("div",{children:(0,i.jsxs)(a.default,{in:!n&&!ee&&"connected"===P,children:[(0,i.jsxs)(i.Fragment,{children:[te,re,ne,A?(0,i.jsx)(o.Typography,{variant:"body2",color:"error",className:e.error,children:A}):null,(0,i.jsx)("div",{className:e.spacer})]}),(0,i.jsx)(M,{swapDetails:$}),ae]})})]}),(0,i.jsx)("div",{className:e.spacer})]})}},31441:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(36664),a=r(83358),s=n(r(48104)),c=r(11039),l=r(86078),u=(0,o.makeStyles)((e=>({flexTitle:{display:"flex",alignItems:"center","& > div":{flexGrow:1,marginRight:e.spacing(4)},"& > button":{marginRight:e.spacing(-1)}},selectedCard:{"&:hover":{cursor:"pointer",boxShadow:"inset 0 0 50px 50px rgba(255, 255, 255, 0.1)"},display:"flex",alignItems:"center",height:25,width:"max-content",padding:".5rem",background:"linear-gradient(90deg, rgba(69,74,117,.2) 0%, rgba(138,146,178,.2) 33%, rgba(69,74,117,.5) 66%, rgba(98,104,143,.5) 100%), linear-gradient(45deg, rgba(153,69,255,.1) 0%, rgba(121,98,231,.1) 20%, rgba(0,209,140,.1) 100%)"},medium:{padding:"1.5rem 3rem"},style2:{background:"linear-gradient(270deg, rgba(69,74,117,.2) 0%, rgba(138,146,178,.2) 33%, rgba(69,74,117,.5) 66%, rgba(98,104,143,.5) 100%), linear-gradient(45deg, rgba(153,69,255,.1) 0%, rgba(121,98,231,.1) 20%, rgba(0,209,140,.1) 100%)"},selectedSymbol:{fontFamily:"Monospace",margin:".5rem",fontSize:"15px"},icon:{height:20,maxWidth:20}}))),d=e=>{let{tokenInfo:t,balance:r,onSelect:n,close:s}=e;const l=u(),d=(0,a.useCallback)((()=>{n(t),s()}),[t,n,s]);return(0,i.jsxs)(o.ListItem,{button:!0,onClick:d,children:[(0,i.jsx)(o.ListItemIcon,{children:(0,i.jsx)("img",{src:t.logoURI,alt:t.name,className:l.icon})}),(0,i.jsx)(o.ListItemText,{primary:t.name,secondary:t.symbol}),(0,i.jsx)(o.ListItemSecondaryAction,{children:void 0===r?"0":(0,c.bigIntToString)(r,t.decimals)})]},t.id)};t.default=function(e){let{tokenId:t,counterpart:r,onChange:n,tokenBalances:f,style2:h,mediumSize:p}=e;const m=u(),[g,v]=(0,a.useState)(!1),y=(0,a.useCallback)((()=>{v(!1)}),[]),b=(0,a.useCallback)((()=>{v(!0)}),[]),w=c.TokenList.find((e=>e.id===t)),x=c.TokenList.filter((e=>e.id!==t&&e.id!==r)).map((e=>(0,i.jsx)(d,{tokenInfo:e,balance:f.get(e.id),onSelect:n,close:y},e.id))),_=m.selectedCard+(h?" "+m.style2:"")+(p?" "+m.medium:"");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.Card,{onClick:b,raised:!0,className:_,children:w?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:w.logoURI,className:m.icon,alt:w.name}),(0,i.jsx)(o.Typography,{variant:"h6",className:m.selectedSymbol,children:w.name})]}):(0,i.jsx)(o.Typography,{variant:"h6",className:m.selectedSymbol,children:"Select token"})}),(0,i.jsxs)(l.MyDialog,{open:g,onClose:y,maxWidth:"xs",fullWidth:!0,children:[(0,i.jsx)(o.DialogTitle,{children:(0,i.jsxs)("div",{className:m.flexTitle,children:[(0,i.jsx)("div",{children:"Select a token"}),(0,i.jsx)(o.IconButton,{onClick:y,children:(0,i.jsx)(s.default,{})})]})}),(0,i.jsx)(o.List,{children:x})]})]})}},54021:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WaitingForTxSubmission=t.TransactionSubmitted=void 0;const i=r(72885),o=r(36664),a=n(r(18078)),s=r(11039),c=n(r(61263)),l=r(63416);t.TransactionSubmitted=function(e){let{open:t,txId:r,buttonText:n,onClick:c}=e;const u=(0,l.commonStyles)();return(0,i.jsx)(o.Collapse,{in:t,children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.default,{fontSize:"inherit",className:u.successIcon}),(0,i.jsx)(o.Typography,{variant:"h5",children:"Transaction Submitted"}),(0,i.jsx)("div",{className:u.spacer}),(0,i.jsx)(o.Link,{target:"_blank",href:(0,s.getExplorerLink)(r),rel:"noreferrer",variant:"body2",children:"View on Explorer"}),(0,i.jsx)("div",{className:u.spacer}),(0,i.jsx)(o.Button,{onClick:c,variant:"contained",color:"primary",size:"large",children:n})]})})},t.WaitingForTxSubmission=function(e){let{open:t,text:r}=e;const n=(0,l.commonStyles)();return(0,i.jsx)("div",{className:n.loaderHolder,children:(0,i.jsx)(o.Collapse,{in:t,children:(0,i.jsxs)("div",{className:n.loaderHolder,children:[(0,i.jsx)(c.default,{}),(0,i.jsx)("div",{className:n.spacer}),(0,i.jsx)("div",{className:n.spacer}),(0,i.jsx)(o.Typography,{variant:"h5",children:r}),(0,i.jsx)("div",{className:n.spacer})]})})})}},63416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commonStyles=void 0;const n=r(36664),i=r(34493);t.commonStyles=(0,n.makeStyles)((e=>({numberField:{flexGrow:1,"& > * > .MuiInputBase-input":{textAlign:"right",height:"100%",flexGrow:"1",fontSize:"1.5rem",fontFamily:"Roboto Mono, monospace",caretShape:"block",width:"0","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{"-webkit-appearance":"none","-moz-appearance":"none",margin:0}},"& > * > input::-webkit-inner-spin-button":{webkitAppearance:"none",margin:"0"}},tokenContainerWithBalance:{minHeight:"44px",padding:".2rem .8rem",border:"3px solid #333333",borderRadius:"10px",width:"initial",height:"80px"},balance:{display:"flex",padding:"0.1rem"},inputRow:{display:"flex",flexFlow:"row nowrap",alignItems:"center",justifyContent:"space-between"},tokenContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",border:"3px solid #333333",padding:".6rem",borderRadius:"10px","& > *":{margin:".1rem"},margin:".5rem 0rem .5rem 0rem",height:"60px"},centeredContainer:{textAlign:"center",width:"100%"},spacer:{height:"1rem"},mainPaper:{padding:"2rem",backgroundColor:i.COLORS.nearBlackWithMinorTransparency},titleBar:{marginTop:"10rem","& > *":{margin:".5rem",alignSelf:"flex-end"}},gradientButton:{backgroundImage:`linear-gradient(45deg, ${i.COLORS.blue} 0%, ${i.COLORS.nearBlack}20 50%, ${i.COLORS.blue}30 62%, ${i.COLORS.nearBlack}50 120%)`,transition:"0.75s",backgroundSize:"200% auto",boxShadow:"0 0 20px #222","&:hover":{backgroundPosition:"right center"},width:"100%",height:"3rem",marginTop:"1rem"},disabled:{background:i.COLORS.gray},loaderHolder:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},successIcon:{color:i.COLORS.green,fontSize:"200px"},error:{marginTop:e.spacing(1),textAlign:"center"},notification:{display:"flex",justifyContent:"space-between"},leftAlign:{textAlign:"left",fontSize:"15px",fontFamily:"monospace"},rightAlign:{textAlign:"right",fontSize:"15px",fontFamily:"monospace"},tokenPairContainer:{display:"flex",justifyContent:"space-between",margin:".5rem 0rem .5rem 0rem",height:"30px"}})))},81541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useAvailableBalances=void 0;const n=r(97434),i=r(83358),o=r(48777);function a(e){var t;const r=new Map;if(void 0===e)return r;const i=BigInt(e.balance)-BigInt(e.lockedBalance);r.set(n.ALPH_TOKEN_ID,i);const o=null!==(t=e.tokenBalances)&&void 0!==t?t:[];for(const n of o){var a,s,c;const t=BigInt(null!==(a=null===(s=e.lockedTokenBalances)||void 0===s||null===(c=s.find((e=>e.id===n.id)))||void 0===c?void 0:c.amount)&&void 0!==a?a:"0"),i=BigInt(n.amount)-t;r.set(n.id,i)}return r}t.useAvailableBalances=function(){const{balance:e,updateBalanceForTx:t}=(0,o.useBalance)();return(0,i.useMemo)((()=>({balance:a(e),updateBalanceForTx:t})),[e,t])}},97306:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDeadline=void 0;const n=r(46031),i=r(35987),o=r(83358),a=r(88587);t.useDeadline=function(){const e=(0,n.useDispatch)(),t=(0,n.useSelector)(i.selectDeadline),r=(0,o.useCallback)((t=>{e((0,a.updateDeadline)({deadline:t}))}),[e]);return[t,r]}},28330:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSlippageToleranceWithDefault=t.useSlippageTolerance=void 0;const n=r(46031),i=r(83358),o=r(35987),a=r(88587);function s(){const e=(0,n.useSelector)(o.selectSlippageTolerance),t=(0,n.useDispatch)(),r=(0,i.useCallback)((e=>{t((0,a.updateSlippageTolerance)({slippageTolerance:e}))}),[t]);return(0,i.useMemo)((()=>[e,r]),[e,r])}t.useSlippageTolerance=s,t.useSlippageToleranceWithDefault=function(e){const[t]=s();return(0,i.useMemo)((()=>"auto"===t?e:t),[t,e])}},96956:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.store=void 0;const i=r(42033),o=n(r(88587)),a=n(r(5026)),s=n(r(99961));t.store=(0,i.configureStore)({reducer:{settings:o.default,swap:a.default,mint:s.default}})},37392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reset=t.typeInput=t.selectTokenB=t.selectTokenA=void 0;const n=r(42033);t.selectTokenA=(0,n.createAction)("mint/selectTokenA"),t.selectTokenB=(0,n.createAction)("mint/selectTokenB"),t.typeInput=(0,n.createAction)("mint/typeInput"),t.reset=(0,n.createAction)("mint/reset")},5236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDerivedMintInfo=void 0;const n=r(46031),i=r(11039),o=r(6692),a=r(83358),s=r(93218);t.useDerivedMintInfo=function(e){const{lastInput:t,inputValue:r,otherInputValue:c,tokenAInfo:l,tokenBInfo:u}=(0,n.useSelector)(o.selectMintState),{tokenPairState:d,getTokenPairStateError:f}=(0,s.useTokenPairState)(l,u),h=(0,a.useMemo)((()=>{const n="TokenA"===t?l:u;try{return(0,i.tryStringToBigInt)(r,null===n||void 0===n?void 0:n.decimals)}catch(o){return console.log(`Invalid input: ${r}, ${null===n||void 0===n?void 0:n.decimals}`),void e(`${o}`)}}),[t,l,u,r,e]),p=(0,a.useMemo)((()=>{const r="TokenA"===t?u:l;try{return(0,i.tryStringToBigInt)(c,null===r||void 0===r?void 0:r.decimals)}catch(n){return console.log(`Invalid input: ${c}, ${null===r||void 0===r?void 0:r.decimals}`),void e(`${n}`)}}),[c,t,l,u,e]),m=(0,a.useMemo)((()=>{try{if(e(f),void 0===l||void 0===u)return;const[r,n]="TokenA"===t?[l.id,u.id]:[u.id,l.id];return void 0!==d&&0n===d.reserve0?void 0!==h&&void 0!==p?{state:d,...(0,i.getInitAddLiquidityDetails)(r,n,h,p)}:void 0:void 0!==h&&d&&t?(0,i.getAddLiquidityDetails)(d,r,h,t):void 0}catch(r){return console.log(`${r}`),void e(`${r}`)}}),[d,f,t,l,u,h,p,e]);return(0,a.useMemo)((()=>{if(void 0===d||0n===d.reserve0){const[e,n,i,o]="TokenA"===t?[r,c,h,p]:[c,r,p,h];return{tokenAInput:e,tokenBInput:n,tokenAAmount:i,tokenBAmount:o,tokenPairState:d,addLiquidityDetails:m}}try{const e="TokenA"===t?r:(0,i.tryBigIntToString)(null===m||void 0===m?void 0:m.amountA,null===l||void 0===l?void 0:l.decimals),n="TokenB"===t?r:(0,i.tryBigIntToString)(null===m||void 0===m?void 0:m.amountB,null===u||void 0===u?void 0:u.decimals),o="TokenA"===t?h:null===m||void 0===m?void 0:m.amountA;return{tokenAInput:e,tokenBInput:n,tokenAAmount:o,tokenBAmount:"TokenB"===t?h:null===m||void 0===m?void 0:m.amountB,tokenPairState:d,addLiquidityDetails:m}}catch(n){return console.log(`${n}`),e(`${n}`),{tokenAInput:void 0,tokenBInput:void 0,tokenAAmount:void 0,tokenBAmount:void 0,tokenPairState:d,addLiquidityDetails:m}}}),[d,t,r,c,h,p,m,l,u,e])}},99961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(42033),i=r(37392),o={lastInput:void 0,inputValue:void 0,otherInputValue:void 0,tokenAInfo:void 0,tokenBInfo:void 0};t.default=(0,n.createReducer)(o,(e=>e.addCase(i.selectTokenA,((e,t)=>({...e,tokenAInfo:t.payload}))).addCase(i.selectTokenB,((e,t)=>({...e,tokenBInfo:t.payload}))).addCase(i.typeInput,((e,t)=>{const r=""===t.payload.value?void 0:t.payload.value;return t.payload.hasLiquidity?{...e,lastInput:t.payload.type,inputValue:r,otherInputValue:void 0}:void 0===e.lastInput||e.lastInput===t.payload.type?{...e,inputValue:r,lastInput:t.payload.type}:{...e,lastInput:t.payload.type,inputValue:r,otherInputValue:e.inputValue}})).addCase(i.reset,(()=>o))))},6692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectMintState=void 0;t.selectMintState=e=>e.mint},88587:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.updateDeadline=t.updateSlippageTolerance=t.initialState=t.DEFAULT_SLIPPAGE=t.DEFAULT_DEADLINE_FROM_NOW=void 0;const i=r(42033);t.DEFAULT_DEADLINE_FROM_NOW=3600,t.DEFAULT_SLIPPAGE=.5,t.initialState={slippageTolerance:"auto",deadline:t.DEFAULT_DEADLINE_FROM_NOW};const o=(0,i.createSlice)({name:"state",initialState:t.initialState,reducers:{updateSlippageTolerance(e,t){e.slippageTolerance=t.payload.slippageTolerance},updateDeadline(e,t){e.deadline=t.payload.deadline}}});n=o.actions,t.updateSlippageTolerance=n.updateSlippageTolerance,t.updateDeadline=n.updateDeadline,t.default=o.reducer},35987:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectDeadline=t.selectSlippageTolerance=void 0;t.selectSlippageTolerance=e=>e.settings.slippageTolerance;t.selectDeadline=e=>e.settings.deadline},9753:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reset=t.typeInput=t.switchTokens=t.selectTokenOut=t.selectTokenIn=void 0;const n=r(42033);t.selectTokenIn=(0,n.createAction)("swap/selectTokenIn"),t.selectTokenOut=(0,n.createAction)("swap/selectTokenOut"),t.switchTokens=(0,n.createAction)("swap/switchTokens"),t.typeInput=(0,n.createAction)("swap/typeInput"),t.reset=(0,n.createAction)("swap/reset")},64586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDerivedSwapInfo=void 0;const n=r(46031),i=r(11039),o=r(18087),a=r(83358),s=r(93218);t.useDerivedSwapInfo=function(e){const{lastInput:t,inputValue:r,tokenInInfo:c,tokenOutInfo:l}=(0,n.useSelector)(o.selectSwapState),{tokenPairState:u,getTokenPairStateError:d}=(0,s.useTokenPairState)(c,l),f=(0,a.useMemo)((()=>{const n="TokenIn"===t?c:l;try{return(0,i.tryStringToBigInt)(r,null===n||void 0===n?void 0:n.decimals)}catch(o){return console.log(`Invalid input: ${r}, ${null===n||void 0===n?void 0:n.decimals}`),void e(`${o}`)}}),[t,c,l,r,e]),h=(0,a.useMemo)((()=>void 0===t?void 0:"TokenIn"===t?"ExactIn":"ExactOut"),[t]),p=(0,a.useMemo)((()=>{try{if(e(d),0n===(null===u||void 0===u?void 0:u.reserve0))throw new Error("This pool has no liquidity yet, please add liquidity to this pool first");const r="TokenIn"===t?c:l;return f&&r&&u&&h?function(e,t,r,n){return"ExactIn"===t?(0,i.getAmountOut)(e,n,r):(0,i.getAmountIn)(e,n,r)}(u,h,f,r.id):void 0}catch(r){return console.log(`${r}`),void e(`${r}`)}}),[u,d,f,t,c,l,e,h]),[m,g,v,y]=(0,a.useMemo)((()=>{try{const e="TokenIn"===t?r:(0,i.tryBigIntToString)(p,null===c||void 0===c?void 0:c.decimals),n="TokenOut"===t?r:(0,i.tryBigIntToString)(p,null===l||void 0===l?void 0:l.decimals);return[e,n,"TokenIn"===t?f:p,"TokenOut"===t?f:p]}catch(n){return console.log(`${n}`),e(`${n}`),[void 0,void 0,void 0,void 0]}}),[t,p,f,r,c,l,e]);return{tokenInInput:m,tokenOutInput:g,tokenInAmount:v,tokenOutAmount:y,tokenPairState:u,swapType:h}}},5026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(42033),i=r(9753),o={lastInput:void 0,inputValue:void 0,tokenInInfo:void 0,tokenOutInfo:void 0};t.default=(0,n.createReducer)(o,(e=>e.addCase(i.selectTokenIn,((e,t)=>({...e,tokenInInfo:t.payload}))).addCase(i.selectTokenOut,((e,t)=>({...e,tokenOutInfo:t.payload}))).addCase(i.switchTokens,(e=>({...e,lastInput:void 0===e.lastInput?void 0:"TokenIn"===e.lastInput?"TokenOut":"TokenIn",tokenInInfo:e.tokenOutInfo,tokenOutInfo:e.tokenInInfo}))).addCase(i.typeInput,((e,t)=>{const r=t.payload.value;return{...e,lastInput:t.payload.type,inputValue:""===r?void 0:r}})).addCase(i.reset,(()=>o))))},18087:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectSwapState=void 0;t.selectSwapState=e=>e.swap},93218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTokenPairState=void 0;const n=r(11039),i=r(83358);t.useTokenPairState=function(e,t){const[r,o]=(0,i.useState)(void 0),[a,s]=(0,i.useState)(void 0),[c,l]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{let r=!0;if(void 0!==e&&void 0!==t)return l(!0),(0,n.getTokenPairState)(e,t).then((e=>{r&&(l(!1),o(e),s(void 0))})).catch((e=>{r&&(l(!1),s(`${e}`),o(void 0))})),()=>{r=!1}}),[e,t]),(0,i.useMemo)((()=>c?{tokenPairState:void 0,getTokenPairStateError:void 0}:{tokenPairState:r,getTokenPairStateError:a}),[c,r,a])}},39519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.genLogo=t.generateAvatarImage=t.getInitials=t.getColor=void 0;const n=r(51086),i=r(72918),o=["02BBA8","29C5FF","0078A4","FFBF3D","FFA85C","FF875B","FF675C","FF5C72"];t.getColor=e=>{const t=n.ethers.utils.id(e).slice(-2),r=parseInt(t,16)%o.length;return o[r]};t.getInitials=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(0,i.isString)(e))return"";const r=t?e.replace(/[^0-9a-z ]/gi,""):e,n=(0,i.upperCase)(r).split(" ");if(1===n.length)return n[0].substring(0,2);const o=n.map((e=>e[0]));return[o[0],o[o.length-1]].join("")};const a=e=>{const t=e.replace("#","");if(!/^[0-9A-F]{6}$/i.test(t))throw new Error(`Invalid color ${e}`);return`#${t}`};t.generateAvatarImage=(e,r)=>{var n;const i=a(r.background),o=a(null!==(n=r.color)&&void 0!==n?n:"#ffffff"),s=(0,t.getInitials)(e,!0);return`data:image/svg+xml;base64,${btoa(`\n \n ${s}\n `)}`},t.genLogo=function(e){const r=(0,t.getColor)(e);return(0,t.generateAvatarImage)(e,{background:r})}},66301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingInterval=t.network=t.networkId=void 0;const n=r(57644);t.networkId="testnet",t.network=function(e){try{const t=(0,n.loadDeployments)(e);return{groupIndex:t.contracts.Router.contractInstance.groupIndex,factoryId:t.contracts.TokenPairFactory.contractInstance.contractId,routerId:t.contracts.Router.contractInstance.contractId}}catch(t){throw console.log(`Failed to load deployments on ${e}, error: ${t}`),t}}(t.networkId),t.PollingInterval="devnet"===t.networkId?1:5},11039:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.tokenPairMatch=t.tryGetBalance=t.tryBigIntToString=t.bigIntToString=t.tryStringToBigInt=t.stringToBigInt=t.getTokenInfos=t.getTokenInfo=t.TokenList=t.ALPHTokenInfo=t.createTokenPair=t.tokenPairExist=t.removeLiquidity=t.getRemoveLiquidityDetails=t.addLiquidity=t.minimalAmount=t.getAddLiquidityDetails=t.getInitAddLiquidityDetails=t.waitTxSubmitted=t.swap=t.getSwapDetails=t.getAmountOut=t.getAmountIn=t.getTokenPairState=t.getExplorerLink=t.sortTokens=t.DexTokens=t.MaxPriceImpact=t.NumberRegex=t.PairTokenDecimals=void 0;const i=r(97434),o=n(r(69937)),a=r(66301),s=n(r(22976)),c=r(48124),l=r(55364),u=r(39519),d=r(35390),f=n(r(61240)),h=1000n;t.PairTokenDecimals=18,t.NumberRegex=new RegExp("^[0-9]*[.]?[0-9]*$"),t.MaxPriceImpact=5;class p{constructor(e,t,r){this.tokenInfos=null!==e&&void 0!==e?e:[],this.tokenPairs=null!==t&&void 0!==t?t:[],this.mapping=null!==r&&void 0!==r?r:new Map}addTokenInfos(e){const t=e.filter((e=>!this.tokenInfos.some((t=>e.id===t.id)))),r=this.tokenInfos.concat(t);return new p(r,this.tokenPairs,this.mapping)}addTokenPairs(e){const t=e.filter((e=>!this.tokenPairs.some((t=>e.tokenPairId===t.tokenPairId)))),r=this.tokenPairs.concat(t);return new p(this.tokenInfos,r,this.mapping)}addMappings(e){const t=new Map(this.mapping.entries());return e.forEach((e=>{let[r,n]=e;const i=t.get(r);void 0===i?t.set(r,n):t.set(r,i.concat(n))})),new p(this.tokenInfos,this.tokenPairs,t)}getAllowedTokenInfos(e){if(void 0===e)return this.tokenInfos;const t=this.mapping.get(e);return void 0===t?[]:this.tokenInfos.filter((e=>t.includes(e.id)))}}function m(e,t){return BigInt("0x"+e)2&&void 0!==arguments[2]?arguments[2]:30;try{return void await e.transactions.getTransactionsTransactionHash(t)}catch(n){if(console.log(`Get transaction status error: ${n}`),0===r)throw n}await new Promise((e=>setTimeout(e,1e3*a.PollingInterval))),await y(e,t,r-1)}function b(e){const t=e.toString().split("."),r=10n**BigInt(2===t.length?t[1].length:0);return[BigInt(2===t.length?t[0]+t[1]:t[0]),r]}function w(e,t){const[r,n]=b(t);return 100n*e*n/(100n*n+r)}function x(e,t){const[r,n]=b(t);return e*(100n*n+r)/(100n*n)}function _(e,t){return e===i.ALPH_TOKEN_ID||t===i.ALPH_TOKEN_ID?2n*i.DUST_AMOUNT:3n*i.DUST_AMOUNT}function E(){return"mainnet"===a.networkId?[t.ALPHTokenInfo,...d.mainnetTokensMetadata.tokens]:"testnet"===a.networkId?[t.ALPHTokenInfo,...d.testnetTokensMetadata.tokens]:f.default.map((e=>({...e,logoURI:(0,u.genLogo)(e.name)}))).concat([t.ALPHTokenInfo])}function k(e,t){try{return(0,c.parseUnits)(e,t).toBigInt()}catch(r){throw new Error(`Invalid amount: ${e}, decimals: ${t}`)}}function S(e,t){const r=(0,i.prettifyTokenAmount)(e,t);if(void 0===r)throw new Error(`Invalid amount: ${e}, decimals: ${t}`);return r}t.DexTokens=p,p.empty=new p,t.sortTokens=m,t.getExplorerLink=function(e){return"mainnet"===a.networkId?`https://explorer.alephium.org/transactions/${e}`:"testnet"===a.networkId?`https://explorer.testnet.alephium.org/transactions/${e}`:`http://localhost:3000/${e}`},t.getTokenPairState=async function(e,t){const r=a.network.factoryId,n=a.network.groupIndex,[o,s]=m(e.id,t.id),c=o+s,u=(0,i.subContractId)(r,c,n),d=(0,i.addressFromContractId)(u),f=l.TokenPair.at(d);try{const r=await f.fetchState();return{tokenPairId:u,reserve0:r.fields.reserve0,reserve1:r.fields.reserve1,token0Info:o===e.id?e:t,token1Info:s===t.id?t:e,totalSupply:r.fields.totalSupply}}catch(h){if(h instanceof Error&&h.message.includes("not found"))throw new Error("Token pair does not exist");throw h}},t.getAmountIn=function(e,t,r){const[n,i,o]=t===e.token0Info.id?[e.token0Info,e.reserve1,e.reserve0]:[e.token1Info,e.reserve0,e.reserve1];return function(e,t,r,n){if(e>=r)throw new Error(`amout must less than reserve, amount: ${S(e,n.decimals)}, reserve: ${S(r,n.decimals)}`);const i=t*e*1000n,o=997n*(r-e);return i/o+1n}(r,i,o,n)},t.getAmountOut=function(e,t,r){return t===e.token0Info.id?g(r,e.reserve0,e.reserve1):g(r,e.reserve1,e.reserve0)},t.getSwapDetails=function(e,t,r,n,i,o,a){const c=function(e,t,r,n){const[i,o]=e.token0Info.id===t?[e.reserve0,e.reserve1]:[e.reserve1,e.reserve0],a=100n*(o*(i+r)-(o-n)*i),c=i*(o-n),l=(0,s.default)(a.toString()).div((0,s.default)(c.toString())).toFixed();return parseFloat(l)}(t,r.id,i,o),l={swapType:e,state:t,tokenInInfo:r,tokenOutInfo:n,tokenInAmount:i,tokenOutAmount:o,priceImpact:c};return"ExactIn"===e?{...l,minimalTokenOutAmount:w(o,a),maximalTokenInAmount:void 0}:{...l,maximalTokenInAmount:x(i,a),minimalTokenOutAmount:void 0}},t.swap=async function(e,r,n,i,o,s){var c;if(e.priceImpact>=t.MaxPriceImpact)throw new Error("Price impact too high");const u=null!==(c=r.get(e.tokenInInfo.id))&&void 0!==c?c:0n;if(u3){let t=e,r=e/2n+1n;for(;rt)throw new Error("liquidity exceed total liquidity amount");const n=r*e.reserve0/e.totalSupply,i=r*e.reserve1/e.totalSupply,o=t-r,a=e.totalSupply-r,c=(0,s.default)((100n*o).toString()).div((0,s.default)(a.toString())).toFixed(5);return{state:e,token0Id:e.token0Info.id,amount0:n,token1Id:e.token1Info.id,amount1:i,remainShareAmount:o,remainSharePercentage:parseFloat(c)}},t.removeLiquidity=async function(e,t,r,n,o,s,c,u,d){const f=w(s,u),h=w(c,u),p=await l.RemoveLiquidity.execute(e,{initialFields:{sender:r,router:a.network.routerId,pairId:n.tokenPairId,liquidity:o,amount0Min:f,amount1Min:h,deadline:v(d)},attoAlphAmount:_(n.token0Info.id,n.token1Info.id)+i.DUST_AMOUNT,tokens:[{id:n.tokenPairId,amount:o}]});return await y(t,p.txId),p},t.tokenPairExist=async function(e,t,r){const n=a.network.factoryId,o=a.network.groupIndex,[s,c]=m(t,r),l=s+c,u=(0,i.subContractId)(n,l,o),d=(0,i.addressFromContractId)(u);return e.addresses.getAddressesAddressGroup(d).then((e=>!0)).catch((e=>{if(e instanceof Error&&-1!==e.message.indexOf("Group not found"))return!1;throw e}))},t.createTokenPair=async function(e,t,r,n,o){const s=a.network.groupIndex,[c,u]=m(n,o),d=c+u,f=(0,i.subContractId)(a.network.factoryId,d,s),h=await l.CreatePair.execute(e,{initialFields:{payer:r,factory:a.network.factoryId,alphAmount:10n**18n,tokenAId:n,tokenBId:o},attoAlphAmount:10n**18n+_(n,o),tokens:[{id:n,amount:1n},{id:o,amount:1n}]});return await y(t,h.txId),{...h,tokenPairId:f}},t.ALPHTokenInfo={...d.ALPH,logoURI:o.default},t.TokenList=E(),t.getTokenInfo=function(e){return t.TokenList.find((t=>t.id.toLowerCase()===e))},t.getTokenInfos=E,t.stringToBigInt=k,t.tryStringToBigInt=function(e,t){if(void 0!==e&&void 0!==t)return k(e,t)},t.bigIntToString=S,t.tryBigIntToString=function(e,t){if(void 0!==e&&void 0!==t)return S(e,t)},t.tryGetBalance=function(e,t){if(void 0===e||void 0===t)return;const r=e.get(t.id);return void 0===r?"0":S(r,t.decimals)},t.tokenPairMatch=function(e,t,r){return(null===e||void 0===e?void 0:e.token0Info.id)===(null===t||void 0===t?void 0:t.id)&&(null===e||void 0===e?void 0:e.token1Info.id)===(null===r||void 0===r?void 0:r.id)||(null===e||void 0===e?void 0:e.token1Info.id)===(null===t||void 0===t?void 0:t.id)&&(null===e||void 0===e?void 0:e.token0Info.id)===(null===r||void 0===r?void 0:r.id)}},27993:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(72885),o=r(36664),a=r(70899),s=r(34493),c=n(r(59462)),l=n(r(46889)),u=n(r(70482)),d=n(r(91697)),f=n(r(1924)),h=r(48777),p=n(r(28238)),m=r(46031),g=r(9753),v=r(37392),y=r(83358),b=r(97434),w=(0,o.makeStyles)((e=>({spacer:{height:"1rem"},appBar:{background:s.COLORS.nearBlackWithMinorTransparency,"& > .MuiToolbar-root":{margin:".5rem 0rem 0rem 1rem",width:"100%"}},link:{...e.typography.body1,color:e.palette.text.primary,marginLeft:e.spacing(6),[e.breakpoints.down("sm")]:{marginLeft:e.spacing(2.5)},[e.breakpoints.down("xs")]:{marginLeft:e.spacing(1)},"&.active":{color:e.palette.primary.light}},bg:{background:"linear-gradient(160deg, rgba(34,37,58,.1) 0%, rgba(69,73,89,.1) 33%, rgba(34,37,58,.1) 66%, rgba(49,52,71,.1) 100%), linear-gradient(45deg, rgba(76,34,128,.1) 0%, rgba(69,49,115,.1) 20%, rgba(0,104,70,.1) 100%)",display:"flex",flexDirection:"column",minHeight:"100vh"}})));t.default=function(){const e=w(),t=(0,m.useDispatch)(),r=(0,h.useWallet)();return(0,y.useEffect)((()=>{void 0!==(null===r||void 0===r?void 0:r.nodeProvider)&&b.web3.setCurrentNodeProvider(r.nodeProvider)}),[null===r||void 0===r?void 0:r.nodeProvider]),(0,i.jsxs)("div",{className:e.bg,children:[(0,i.jsx)(o.AppBar,{position:"static",color:"inherit",className:e.appBar,elevation:0,children:(0,i.jsxs)(o.Toolbar,{children:[(0,i.jsx)("div",{className:e.spacer}),(0,i.jsx)(o.Hidden,{implementation:"css",xsDown:!0,children:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,i.jsx)(o.Link,{component:a.NavLink,to:"/swap",color:"inherit",className:e.link,onClick:()=>{t((0,g.reset)())},children:"Swap"}),(0,i.jsx)(o.Link,{component:a.NavLink,to:"/add-liquidity",color:"inherit",className:e.link,onClick:()=>{t((0,v.reset)())},children:"Add Liquidity"}),(0,i.jsx)(o.Link,{component:a.NavLink,to:"/remove-liquidity",color:"inherit",className:e.link,children:"Remove Liquidity"}),(0,i.jsx)(o.Link,{component:a.NavLink,to:"/add-pool",color:"inherit",className:e.link,children:"Add Pool"}),(0,i.jsx)(o.Link,{component:a.NavLink,to:"/pool",color:"inherit",className:e.link,children:"Pool"})]})}),(0,i.jsx)("div",{style:{position:"absolute",top:"6px",right:"30px"},children:(0,i.jsx)(p.default,{})}),(0,i.jsx)("div",{style:{position:"absolute",top:"10px",right:"80px"},children:(0,i.jsx)(h.AlephiumConnectButton,{})})]})}),(0,i.jsxs)(a.Switch,{children:[(0,i.jsx)(a.Route,{exact:!0,path:"/swap",children:(0,i.jsx)(c.default,{})}),(0,i.jsx)(a.Route,{exact:!0,path:"/add-liquidity",children:(0,i.jsx)(l.default,{})}),(0,i.jsx)(a.Route,{exact:!0,path:"/remove-liquidity",children:(0,i.jsx)(u.default,{})}),(0,i.jsx)(a.Route,{exact:!0,path:"/add-pool",children:(0,i.jsx)(d.default,{})}),(0,i.jsx)(a.Route,{exact:!0,path:"/pool",children:(0,i.jsx)(f.default,{})}),(0,i.jsx)(a.Route,{children:(0,i.jsx)(a.Redirect,{to:"/swap"})})]})]})}},35390:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ALPH=t.testnetNFTCollectionsMetadata=t.mainnetNFTCollectionsMetadata=t.testnetTokensMetadata=t.mainnetTokensMetadata=void 0;const a=o(r(79815)),s=o(r(51758)),c=o(r(13481)),l=o(r(68715));i(r(14368),t),t.mainnetTokensMetadata=c.default,t.testnetTokensMetadata=l.default,t.mainnetNFTCollectionsMetadata=a.default,t.testnetNFTCollectionsMetadata=s.default,t.default={mainnet:{tokens:t.mainnetTokensMetadata,nftCollections:t.mainnetNFTCollectionsMetadata},testnet:{tokens:t.testnetTokensMetadata,nftCollections:t.testnetNFTCollectionsMetadata}},t.ALPH={id:"".padStart(64,"0"),name:"Alephium",symbol:"ALPH",decimals:18}},14368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ALEPHIUM_DEEP_LINK=t.RELAY_URL=t.LOGGER=t.RELAY_METHODS=t.PROVIDER_NAMESPACE=void 0,t.PROVIDER_NAMESPACE="alephium",t.RELAY_METHODS=["alph_signAndSubmitTransferTx","alph_signAndSubmitDeployContractTx","alph_signAndSubmitExecuteScriptTx","alph_signAndSubmitUnsignedTx","alph_signUnsignedTx","alph_signMessage","alph_requestNodeApi","alph_requestExplorerApi"],t.LOGGER="error",t.RELAY_URL="wss://relay.walletconnect.com",t.ALEPHIUM_DEEP_LINK="alephium://"},30830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(54406);n.__exportStar(r(39088),t),n.__exportStar(r(22834),t),n.__exportStar(r(30352),t)},39088:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccount=t.formatAccount=t.parseChain=t.formatChain=t.isCompatibleAddressGroup=t.isCompatibleChain=t.WalletConnectProvider=void 0;const n=r(54406),i=n.__importDefault(r(46902)),o=n.__importDefault(r(19100)),a=r(6588),s=r(6588),c=r(97434),l=r(22834),u=r(67760);class d extends c.SignerProvider{static async init(e){const t=new d(e);return await t.initialize(),t}constructor(e){var t;super(),this.events=new i.default,this.account=void 0,this.requestNodeAPI=e=>this.typedRequest("alph_requestNodeApi",e),this.requestExplorerAPI=e=>this.typedRequest("alph_requestExplorerApi",e),this.providerOpts=e,this.networkId=e.networkId,this.addressGroup=e.addressGroup,this.permittedChain=h(this.networkId,this.addressGroup),this.methods=null!==(t=e.methods)&&void 0!==t?t:[...l.RELAY_METHODS],this.methods.includes("alph_requestNodeApi")?this.nodeProvider=c.NodeProvider.Remote(this.requestNodeAPI):this.nodeProvider=void 0,this.methods.includes("alph_requestExplorerApi")?this.explorerProvider=c.ExplorerProvider.Remote(this.requestExplorerAPI):this.explorerProvider=void 0}async connect(){if(this.session)this.updateNamespace(this.session.namespaces),await this.ping(this.session.topic);else{const{uri:e,approval:t}=await this.client.connect({requiredNamespaces:{alephium:{chains:[this.permittedChain],methods:this.methods,events:["accountChanged"]}}});e&&this.emitEvents("displayUri",e),this.session=await t(),this.updateNamespace(this.session.namespaces)}}async ping(e){const t=new Promise(((e,t)=>{setTimeout((()=>t(new Error("Auto connect timeout"))),5e3)}));await Promise.race([this.client.ping({topic:e}),t]).catch((t=>{this.client.session.delete(e,{code:0,message:`Error: ${t}`}),this.session=void 0,this.account=void 0}))}async disconnect(){if(!this.client||!this.session)throw new Error("Sign Client not initialized");await this.providerOpts.onDisconnected(),await this.client.disconnect({topic:this.session.topic,reason:(0,s.getSdkError)("USER_DISCONNECTED")}),this.session=void 0,this.account=void 0}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}unsafeGetSelectedAccount(){if(void 0===this.account)throw Error("Account is not available");return Promise.resolve(this.account)}async signAndSubmitTransferTx(e){return this.typedRequest("alph_signAndSubmitTransferTx",e)}async signAndSubmitDeployContractTx(e){return this.typedRequest("alph_signAndSubmitDeployContractTx",e)}async signAndSubmitExecuteScriptTx(e){return this.typedRequest("alph_signAndSubmitExecuteScriptTx",e)}async signAndSubmitUnsignedTx(e){return this.typedRequest("alph_signAndSubmitUnsignedTx",e)}async signUnsignedTx(e){return this.typedRequest("alph_signUnsignedTx",e)}async signMessage(e){return this.typedRequest("alph_signMessage",e)}async initialize(){await this.createClient(),this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await o.default.init({logger:this.providerOpts.logger||l.LOGGER,relayUrl:this.providerOpts.relayUrl||l.RELAY_URL,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata})}checkStorage(){const e=this.client.session.keys;for(let t=e.length-1;t>=0;t--){const r=this.client.session.get(e[`${t}`]),n=(0,s.getChainsFromNamespaces)(r.namespaces,[l.PROVIDER_NAMESPACE]);if(this.sameChains(n,[this.permittedChain]))return void(this.session=r)}}registerEventListeners(){if("undefined"===typeof this.client)throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.emitEvents("session_ping",e)})),this.client.on("session_event",(e=>{this.emitEvents("session_event",e)})),this.client.on("session_update",(e=>{var t;let{topic:r,params:n}=e;const{namespaces:i}=n,o=null===(t=this.client)||void 0===t?void 0:t.session.get(r);this.session={...o,namespaces:i},this.updateNamespace(this.session.namespaces),this.emitEvents("session_update",{topic:r,params:n})})),this.client.on("session_delete",(()=>{this.emitEvents("session_delete")}))}emitEvents(e,t){this.events.emit(e,t)}typedRequest(e,t){return this.request({method:e,params:t})}async request(e){if(!this.session)throw new Error("Sign Client not initialized");if(!this.methods.includes(e.method))return Promise.reject(new Error(`Invalid method was passed: ${e.method}`));if(!e.method.startsWith("alph_request")){var t;const r=null===(t=e.params)||void 0===t?void 0:t.signerAddress;if("undefined"===typeof r)throw new Error("Cannot request without signerAddress");if(r!==(await this.getSelectedAccount()).address)throw new Error(`Invalid signer address: ${e.params.signerAddress}`)}try{var r;e.method.startsWith("alph_sign")&&(0,u.isMobile)()&&(0,a.isBrowser)()&&window.open(l.ALEPHIUM_DEEP_LINK,"_self","noreferrer noopener");return await this.client.request({request:{method:e.method,params:e.params},chainId:this.permittedChain,topic:null===(r=this.session)||void 0===r?void 0:r.topic})}catch(n){if(n.message)throw new Error(n.message);throw n}}updateNamespace(e){const t=(0,s.getChainsFromNamespaces)(e,[l.PROVIDER_NAMESPACE]);this.setChain(t);const r=(0,s.getAccountsFromNamespaces)(e,[l.PROVIDER_NAMESPACE]);this.setAccounts(r)}sameChains(e,t){return"undefined"!==typeof t&&e.join()===t.join()}setChain(e){if(!this.sameChains(e,[this.permittedChain]))throw Error("Network or address group has changed")}sameAccounts(e,t){return"undefined"!==typeof t&&e.map((e=>e.address)).join()===t.map((e=>e.address)).join()}isPreauthorized(){if(!this.session)return!1;const e=(0,s.getAccountsFromNamespaces)(this.session.namespaces,[l.PROVIDER_NAMESPACE]).map(p),{networkId:t,addressGroup:r,keyType:n}=this.providerOpts;return!!e.find((e=>t===e.networkId&&(void 0===r||e.group===r)&&(void 0===n||e.keyType===n)))}setAccounts(e){const t=e.map(p);if(this.sameAccounts(t,this.lastSetAccounts))return;if(this.lastSetAccounts=t,1!==t.length)throw Error("The WC provider does not supports multiple accounts");const r=t[0];if(!f(r.group,this.addressGroup))throw Error("The new account belongs to an unexpected address group");this.account=r,this.emitEvents("accountChanged",r)}}function f(e,t){return void 0===t||t===e}function h(e,t){if(void 0!==t&&t<0)throw Error("Address group in provider needs to be either undefined or non-negative");const r=void 0!==t?t:-1;return`${l.PROVIDER_NAMESPACE}:${e}/${r}`}function p(e){const[t,r,n,i,o]=e.replace(/\//g,":").split(":"),a=(0,c.addressFromPublicKey)(i),s=(0,c.groupOfAddress)(a);if("default"!==o&&"bip340-schnorr"!==o)throw Error(`Invalid key type: ${o}`);return{address:a,group:s,publicKey:i,keyType:o,networkId:r}}t.WalletConnectProvider=d,t.isCompatibleChain=function(e){return e.startsWith(`${l.PROVIDER_NAMESPACE}:`)},t.isCompatibleAddressGroup=f,t.formatChain=h,t.parseChain=function(e){const[t,r,n]=e.replace(/\//g,":").split(":"),i=parseInt(n,10);if(i<-1)throw Error("Address group in protocol needs to be either -1 or non-negative");const o=c.networkIds;if(!o.includes(r))throw Error(`Invalid network id, expect one of ${o}`);return{networkId:r,addressGroup:-1===i?void 0:i}},t.formatAccount=function(e,t){return`${e}:${t.publicKey}/${t.keyType}`},t.parseAccount=p},30352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(97434);(0,n.assertType)(),(0,n.assertType)()},67760:(e,t)=>{"use strict";function r(){return"undefined"!==typeof navigator&&/iPhone|iPod/.test(navigator.userAgent)||"undefined"!==typeof navigator&&(/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)}Object.defineProperty(t,"__esModule",{value:!0}),t.isMobile=void 0,t.isMobile=function(){return"undefined"!==typeof navigator&&/android/i.test(navigator.userAgent)||r()}},62003:(e,t,r)=>{var n=r(54501);function i(e){return e&&"object"===typeof e&&"default"in e?e.default:e}var o=r(26832),a=i(r(41648)),s=i(r(76647)),c=r(97376);var l=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n';"undefined"!==typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!==typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var u="data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",d="WalletConnect",f=300,h="rgb(64, 153, 255)",p="walletconnect-wrapper",m="walletconnect-style-sheet",g="walletconnect-qrcode-modal",v="walletconnect-qrcode-close",y="walletconnect-qrcode-text",b="walletconnect-connect-button";function w(e){return c.createElement("div",{className:"walletconnect-modal__header"},c.createElement("img",{src:u,className:"walletconnect-modal__headerLogo"}),c.createElement("p",null,d),c.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:e.onClose},c.createElement("div",{id:v,className:"walletconnect-modal__close__icon"},c.createElement("div",{className:"walletconnect-modal__close__line1"}),c.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function x(e){return c.createElement("a",{className:"walletconnect-connect__button",href:e.href,id:b+"-"+e.name,onClick:e.onClick,rel:"noopener noreferrer",style:{backgroundColor:e.color},target:"_blank"},e.name)}var _="data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E";function E(e){var t=e.color,r=e.href,n=e.name,i=e.logo,o=e.onClick;return c.createElement("a",{className:"walletconnect-modal__base__row",href:r,onClick:o,rel:"noopener noreferrer",target:"_blank"},c.createElement("h3",{className:"walletconnect-modal__base__row__h3"},n),c.createElement("div",{className:"walletconnect-modal__base__row__right"},c.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+i+"') "+t,backgroundSize:"100%"}}),c.createElement("img",{src:_,className:"walletconnect-modal__base__row__right__caret"})))}function k(e){var t=e.color,r=e.href,n=e.name,i=e.logo,o=e.onClick,a=window.innerWidth<768?(n.length>8?2.5:2.7)+"vw":"inherit";return c.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:o,rel:"noopener noreferrer",target:"_blank"},c.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+i+"') "+t,backgroundSize:"100%"}}),c.createElement("div",{style:{fontSize:a},className:"walletconnect-connect__button__text"},n))}var S=5,A=12;function M(e){var t=o.isAndroid(),r=c.useState(""),n=r[0],i=r[1],a=c.useState(""),s=a[0],l=a[1],u=c.useState(1),d=u[0],f=u[1],p=s?e.links.filter((function(e){return e.name.toLowerCase().includes(s.toLowerCase())})):e.links,m=e.errorMessage,g=s||p.length>S,v=Math.ceil(p.length/A),b=[(d-1)*A+1,d*A],w=p.length?p.filter((function(e,t){return t+1>=b[0]&&t+1<=b[1]})):[],_=!(t||!(v>1)),M=void 0;return c.createElement("div",null,c.createElement("p",{id:y,className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&c.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:function(e){i(e.target.value),clearTimeout(M),e.target.value?M=setTimeout((function(){l(e.target.value),f(1)}),1e3):(i(""),l(""),f(1))}}),c.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":g&&p.length?"__wrap":"")},t?c.createElement(x,{name:e.text.connect,color:h,href:e.uri,onClick:c.useCallback((function(){}),[])}):w.length?w.map((function(t){var r=t.color,n=t.name,i=t.shortName,a=t.logo,s=o.formatIOSMobile(e.uri,t),l=c.useCallback((function(){}),[]);return g?c.createElement(k,{color:r,href:s,name:i||n,logo:a,onClick:l}):c.createElement(E,{color:r,href:s,name:n,logo:a,onClick:l})})):c.createElement(c.Fragment,null,c.createElement("p",null,m.length?e.errorMessage:e.links.length&&!p.length?e.text.no_wallets_found:e.text.loading))),_&&c.createElement("div",{className:"walletconnect-modal__footer"},Array(v).fill(0).map((function(e,t){var r=t+1,n=d===r;return c.createElement("a",{style:{margin:"auto 10px",fontWeight:n?"bold":"normal"},onClick:function(){return f(r)}},r)}))))}function C(e){var t=!!e.message.trim();return c.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}var I=function(e){try{var t="";return Promise.resolve(a.toString(e,{margin:0,type:"svg"})).then((function(e){return"string"===typeof e&&(t=e.replace("0||c.useEffect((function(){!function(){try{if(t)return Promise.resolve();s(!0);var i=function(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}((function(){var t=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:o.getWalletRegistryUrl();return Promise.resolve(fetch(t)).then((function(t){return Promise.resolve(t.json()).then((function(t){var i=t.listings,a=r?"mobile":"desktop",c=o.getMobileLinkRegistry(o.formatMobileRegistry(i,a),n);s(!1),d(!0),P(c.length?"":e.text.no_supported_wallets),A(c);var l=1===c.length;l&&(b(o.formatIOSMobile(e.uri,c[0])),p(!0)),E(l)}))}))}),(function(t){s(!1),d(!0),P(e.text.something_went_wrong),console.error(t)}));return Promise.resolve(i&&i.then?i.then((function(){})):void 0)}catch(a){return Promise.reject(a)}}()}))};O();var R=r?h:!h;return c.createElement("div",{id:g,className:"walletconnect-qrcode__base animated fadeIn"},c.createElement("div",{className:"walletconnect-modal__base"},c.createElement(w,{onClose:e.onClose}),_&&h?c.createElement("div",{className:"walletconnect-modal__single_wallet"},c.createElement("a",{href:y,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(_?S[0].name:"")+" \u203a")):t||a||!a&&S.length?c.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(R?" right__selected":"")},c.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?c.createElement(c.Fragment,null,c.createElement("a",{onClick:function(){return p(!1),O()}},e.text.mobile),c.createElement("a",{onClick:function(){return p(!0)}},e.text.qrcode)):c.createElement(c.Fragment,null,c.createElement("a",{onClick:function(){return p(!0)}},e.text.qrcode),c.createElement("a",{onClick:function(){return p(!1),O()}},e.text.desktop))):null,c.createElement("div",null,h||!t&&!a&&!S.length?c.createElement(T,Object.assign({},m)):c.createElement(M,Object.assign({},m,{links:S,errorMessage:I})))))}var O={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouv\xe9"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4",no_wallets_found:"\uc9c0\uac11\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305",no_wallets_found:"\u6ca1\u6709\u627e\u5230\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f",no_wallets_found:"\u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644\u06cc \u067e\u06cc\u062f\u0627 \u0646\u0634\u062f"}};function R(){var e=o.getDocumentOrThrow(),t=e.getElementById(g);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout((function(){var t=e.getElementById(p);t&&e.body.removeChild(t)}),f))}function N(e){return function(){R(),e&&e()}}function B(){var e=o.getNavigatorOrThrow().language.split("-")[0]||"en";return O[e]||O.en}function L(e,t,r){!function(){var e=o.getDocumentOrThrow(),t=e.getElementById(m);t&&e.head.removeChild(t);var r=e.createElement("style");r.setAttribute("id",m),r.innerText=l,e.head.appendChild(r)}();var n=function(){var e=o.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id",p),e.body.appendChild(t),t}();c.render(c.createElement(P,{text:B(),uri:e,onClose:N(t),qrcodeModalOptions:r}),n)}var j=function(){return"undefined"!==typeof n&&"undefined"!==typeof n.versions&&"undefined"!==typeof n.versions.node};var D={open:function(e,t,r){console.log(e),j()?function(e){a.toString(e,{type:"terminal"}).then(console.log)}(e):L(e,t,r)},close:function(){j()||R()}};e.exports=D},64508:(e,t,r)=>{"use strict";var n=r(84505),i=r(74574),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;var a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return l(e,t,r)}function l(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|m(e,t),n=s(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);var i=function(e){if(c.isBuffer(e)){var t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||Z(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),s(e<0?0:0|p(e))}function f(e){for(var t=e.length<0?0:0|p(e.length),r=s(t),n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(i)return n?-1:D(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){for(var d=!0,f=0;fi&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:l>223?3:l>191?2:1;if(i+d<=r)switch(d){case 1:l<128&&(u=l);break;case 2:128===(192&(o=e[i+1]))&&(c=(31&l)<<6|63&o)>127&&(u=c);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(c=(15&l)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=d}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nn.length?c.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(n,i),u=e.slice(t,r),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!==e}var q=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},17927:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},41648:(e,t,r)=>{var n=r(946),i=r(66378),o=r(42006),a=r(39719);function s(e,t,r,o,a){var s=[].slice.call(arguments,1),c=s.length,l="function"===typeof s[c-1];if(!l&&!n())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=o=void 0):2!==c||t.getContext||(o=r,r=t,t=void 0),new Promise((function(n,a){try{var s=i.create(r,o);n(e(s,t,o))}catch(c){a(c)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(a=r,r=t,t=o=void 0):3===c&&(t.getContext&&"undefined"===typeof a?(a=o,o=void 0):(a=o,o=r,r=t,t=void 0));try{var u=i.create(r,o);a(null,e(u,t,o))}catch(d){a(d)}}t.create=i.create,t.toCanvas=s.bind(null,o.render),t.toDataURL=s.bind(null,o.renderToDataURL),t.toString=s.bind(null,(function(e,t,r){return a.render(e,r)}))},946:e=>{e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},54361:(e,t,r)=>{var n=r(67501).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];for(var t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7],a=1;a{var n=r(612),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=n.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){var t;for(t=0;t+2<=this.data.length;t+=2){var r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},84982:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1===(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},228:(e,t,r)=>{var n=r(10640);function i(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=n.alloc(e*e),this.reservedBit=n.alloc(e*e)}i.prototype.set=function(e,t,r,n){var i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},i.prototype.get=function(e,t){return this.data[e*this.size+t]},i.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},i.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=i},95243:(e,t,r)=>{var n=r(10640),i=r(612);function o(e){this.mode=i.BYTE,this.data=n.from(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(var t=0,r=this.data.length;t{var n=r(83976),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case n.L:return i[4*(e-1)+0];case n.M:return i[4*(e-1)+1];case n.Q:return i[4*(e-1)+2];case n.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return o[4*(e-1)+0];case n.M:return o[4*(e-1)+1];case n.Q:return o[4*(e-1)+2];case n.H:return o[4*(e-1)+3];default:return}}},83976:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&"undefined"!==typeof e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(n){return r}}},67090:(e,t,r)=>{var n=r(67501).getSymbolSize;t.getPositions=function(e){var t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},41783:(e,t,r)=>{var n=r(67501),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){for(var r=e.bit<<3|t,o=r<<10;n.getBCHDigit(o)-i>=0;)o^=1335<{var n=r(10640),i=n.alloc(512),o=n.alloc(256);!function(){for(var e=1,t=0;t<255;t++)i[t]=e,o[e]=t,256&(e<<=1)&&(e^=285);for(t=255;t<512;t++)i[t]=i[t-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return o[e]},t.exp=function(e){return i[e]},t.mul=function(e,t){return 0===e||0===t?0:i[o[e]+o[t]]}},81305:(e,t,r)=>{var n=r(612),i=r(67501);function o(e){this.mode=n.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){var t;for(t=0;t=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=o},52088:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var r=3,n=3,i=40,o=10;function a(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return n%3===0;case t.Patterns.PATTERN011:return(r+n)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2===0;case t.Patterns.PATTERN101:return r*n%2+r*n%3===0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2===0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){for(var t=e.size,n=0,i=0,o=0,a=null,s=null,c=0;c=5&&(n+=r+(i-5)),a=u,i=1),(u=e.get(l,c))===s?o++:(o>=5&&(n+=r+(o-5)),s=u,o=1)}i>=5&&(n+=r+(i-5)),o>=5&&(n+=r+(o-5))}return n},t.getPenaltyN2=function(e){for(var t=e.size,r=0,i=0;i=10&&(1488===n||93===n)&&r++,o=o<<1&2047|e.get(s,a),s>=10&&(1488===o||93===o)&&r++}return r*i},t.getPenaltyN4=function(e){for(var t=0,r=e.data.length,n=0;n{var n=r(97052),i=r(75513);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(n){return r}}},23009:(e,t,r)=>{var n=r(612);function i(e){this.mode=n.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);var i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},e.exports=i},47580:(e,t,r)=>{var n=r(10640),i=r(39402);t.mul=function(e,t){for(var r=n.alloc(e.length+t.length-1),o=0;o=0;){for(var o=r[0],a=0;a{var n=r(10640),i=r(67501),o=r(83976),a=r(84982),s=r(228),c=r(54361),l=r(67090),u=r(52088),d=r(8657),f=r(68086),h=r(53147),p=r(41783),m=r(612),g=r(16299),v=r(17927);function y(e,t,r){var n,i,o=e.size,a=p.getEncodedBits(t,r);for(n=0;n<15;n++)i=1===(a>>n&1),n<6?e.set(n,8,i,!0):n<8?e.set(n+1,8,i,!0):e.set(o-15+n,8,i,!0),n<8?e.set(8,o-n-1,i,!0):n<9?e.set(8,15-n-1+1,i,!0):e.set(8,15-n-1,i,!0);e.set(o-8,8,1,!0)}function b(e,t,r){var o=new a;r.forEach((function(t){o.put(t.mode.bit,4),o.put(t.getLength(),m.getCharCountIndicator(t.mode,e)),t.write(o)}));var s=8*(i.getSymbolTotalCodewords(e)-d.getTotalCodewordsCount(e,t));for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);for(var c=(s-o.getLengthInBits())/8,l=0;l=0&&s<=6&&(0===c||6===c)||c>=0&&c<=6&&(0===s||6===s)||s>=2&&s<=4&&c>=2&&c<=4?e.set(o+s,a+c,!0,!0):e.set(o+s,a+c,!1,!0))}(w,t),function(e){for(var t=e.size,r=8;r=7&&function(e,t){for(var r,n,i,o=e.size,a=h.getEncodedBits(t),s=0;s<18;s++)r=Math.floor(s/3),n=s%3+o-8-3,i=1===(a>>s&1),e.set(r,n,i,!0),e.set(n,r,i,!0)}(w,t),function(e,t){for(var r=e.size,n=-1,i=r-1,o=7,a=0,s=r-1;s>0;s-=2)for(6===s&&s--;;){for(var c=0;c<2;c++)if(!e.isReserved(i,s-c)){var l=!1;a>>o&1)),e.set(i,s-c,l),-1===--o&&(a++,o=7)}if((i+=n)<0||r<=i){i-=n,n=-n;break}}}(w,p),isNaN(n)&&(n=u.getBestMask(w,y.bind(null,w,r))),u.applyMask(n,w),y(w,r,n),{modules:w,version:t,errorCorrectionLevel:r,maskPattern:n,segments:o}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");var r,n,a=o.M;return"undefined"!==typeof t&&(a=o.from(t.errorCorrectionLevel,o.M),r=h.from(t.version),n=u.from(t.maskPattern),t.toSJISFunc&&i.setToSJISFunction(t.toSJISFunc)),w(e,r,a,n)}},68086:(e,t,r)=>{var n=r(10640),i=r(47580),o=r(64508).lW;function a(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(e){this.degree=e,this.genPoly=i.generateECPolynomial(this.degree)},a.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=n.alloc(this.degree),r=o.concat([e,t],e.length+this.degree),a=i.mod(r,this.genPoly),s=this.degree-a.length;if(s>0){var c=n.alloc(this.degree);return a.copy(c,s),c}return a},e.exports=a},75513:(e,t)=>{var r="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+n+"$"),a=new RegExp("^"+r+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},16299:(e,t,r)=>{var n=r(612),i=r(23009),o=r(12663),a=r(95243),s=r(81305),c=r(75513),l=r(67501),u=r(59311);function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,r){for(var n,i=[];null!==(n=e.exec(r));)i.push({data:n[0],index:n.index,mode:t,length:n[0].length});return i}function h(e){var t,r,i=f(c.NUMERIC,n.NUMERIC,e),o=f(c.ALPHANUMERIC,n.ALPHANUMERIC,e);return l.isKanjiModeEnabled()?(t=f(c.BYTE,n.BYTE,e),r=f(c.KANJI,n.KANJI,e)):(t=f(c.BYTE_KANJI,n.BYTE,e),r=[]),i.concat(o,t,r).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return o.getBitsLength(e);case n.KANJI:return s.getBitsLength(e);case n.BYTE:return a.getBitsLength(e)}}function m(e,t){var r,c=n.getBestModeForData(e);if((r=n.from(t,c))!==n.BYTE&&r.bit=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(h(e,l.isKanjiModeEnabled()))}},67501:(e,t)=>{var r,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof r},t.toSJIS=function(e){return r(e)}},97052:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},53147:(e,t,r)=>{var n=r(67501),i=r(8657),o=r(83976),a=r(612),s=r(97052),c=r(17927),l=n.getBCHDigit(7973);function u(e,t){return a.getCharCountIndicator(e,t)+4}function d(e,t){var r=0;return e.forEach((function(e){var n=u(e.mode,t);r+=n+e.getBitsLength()})),r}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!s.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof r&&(r=a.BYTE);var o=8*(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(r===a.MIXED)return o;var c=o-u(r,e);switch(r){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,r){var n,i=o.from(r,o.M);if(c(e)){if(e.length>1)return function(e,r){for(var n=1;n<=40;n++)if(d(e,n)<=t.getCapacity(n,r,a.MIXED))return n}(e,i);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(var i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var t=e<<12;n.getBCHDigit(t)-l>=0;)t^=7973<{var n=r(85036);t.render=function(e,t,r){var i=r,o=t;"undefined"!==typeof i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);var a=n.getImageWidth(e.modules.size,i),s=o.getContext("2d"),c=s.createImageData(a,a);return n.qrToImageData(c.data,e,i),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(s,o,a),s.putImageData(c,0,0),o},t.renderToDataURL=function(e,r,n){var i=n;"undefined"!==typeof i||r&&r.getContext||(i=r,r=void 0),i||(i={});var o=t.render(e,r,i),a=i.type||"image/png",s=i.rendererOpts||{};return o.toDataURL(a,s.quality)}},39719:(e,t,r)=>{var n=r(85036);function i(e,t){var r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(e,t,r){var n=e+t;return"undefined"!==typeof r&&(n+=" "+r),n}t.render=function(e,t,r){var a=n.getOptions(t),s=e.modules.size,c=e.modules.data,l=s+2*a.margin,u=a.color.light.a?"':"",d="0&&l>0&&e[c-1]||(n+=a?o("M",l+r,.5+u+r):o("m",i,0),i=0,a=!1),l+1',f='viewBox="0 0 '+l+" "+l+'"',h=''+u+d+"\n";return"function"===typeof r&&r(null,h),h}},85036:(e,t)=>{function r(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});var t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){var n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){for(var i=r.modules.size,o=r.modules.data,a=t.getScale(i,n),s=Math.floor((i+2*n.margin)*a),c=n.margin*a,l=[n.color.light,n.color.dark],u=0;u=c&&d>=c&&u{"use strict";var n=r(17927);o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}();var i=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(e,t,r){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"===typeof e?c(this,e):function(e,t,r,n){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');if("undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer)return function(e,t,r,n){if(r<0||t.byteLength=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function s(e,t){var r;return o.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t)).__proto__=o.prototype:(null===(r=e)&&(r=new o(t)),r.length=t),r}function c(e,t){var r=s(e,t<0?0:0|a(t));if(!o.TYPED_ARRAY_SUPPORT)for(var n=0;n55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function d(e){return o.isBuffer(e)?e.length:"undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)?e.byteLength:("string"!==typeof e&&(e=""+e),0===e.length?0:u(e).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(e,t,r){void 0===t||void 0===r&&"string"===typeof t?(r=this.length,t=0):isFinite(t)&&(t|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(e,t,r,n){return function(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}(u(t,e.length-r),e,r,n)}(this,e,t,r)},o.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i{"use strict";r.d(t,{i:()=>n});const n="abi/5.7.0"},11409:(e,t,r)=>{"use strict";r.d(t,{R:()=>T,$:()=>P});var n=r(74905),i=r(37025),o=r(83820),a=r(66875),s=r(8767),c=r(87243);class l extends s.XI{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,c.getAddress)(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}decode(e){return(0,c.getAddress)((0,n.hexZeroPad)(e.readValue().toHexString(),20))}}class u extends s.XI{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const d=new o.Logger(a.i);function f(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||d.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&d.throwError("cannot encode object for signature with duplicate names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else d.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&d.throwArgumentError("types/value length mismatch","tuple",r);let i=new s.QV(e.wordSize),a=new s.QV(e.wordSize),c=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=a.length;e.encode(a,r);let n=i.writeUpdatableValue();c.push((e=>{n(e+t)}))}else e.encode(i,r)})),c.forEach((e=>{e(i.length)}));let l=e.appendWriter(i);return l+=e.appendWriter(a),l}function h(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),s=n.subReader(r.toNumber());try{i=t.decode(s)}catch(a){if(a.code===o.Logger.errors.BUFFER_OVERRUN)throw a;i=a,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(a){if(a.code===o.Logger.errors.BUFFER_OVERRUN)throw a;i=a,i.baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o{throw e}})}return Object.freeze(r)}class p extends s.XI{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&d.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let n=0;n{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return f(e,this.coders,t)}decode(e){return e.coerce(this.name,h(e,this.coders))}}var A=r(31645);const M=new o.Logger(a.i),C=new RegExp(/^bytes([0-9]*)$/),I=new RegExp(/^(u?int)([0-9]*)$/);class T{constructor(e){(0,i.defineReadOnly)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new l(e.name);case"bool":return new m(e.name);case"string":return new k(e.name);case"bytes":return new v(e.name);case"array":return new p(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new S((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new b(e.name)}let t=e.type.match(I);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!==0)&&M.throwArgumentError("invalid "+t[1]+" bit length","param",e),new _(r/8,"int"===t[1],e.name)}if(t=e.type.match(C),t){let r=parseInt(t[1]);return(0===r||r>32)&&M.throwArgumentError("invalid bytes length","param",e),new y(r,e.name)}return M.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new s.Ej(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new s.QV(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(A._R.from(e))));return new S(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&M.throwError("types/values length mismatch",o.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(A._R.from(e)))),n=new S(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const i=e.map((e=>this._getCoder(A._R.from(e))));return new S(i,"_").decode(this._getReader((0,n.arrayify)(t),r))}}const P=new T},8767:(e,t,r)=>{"use strict";r.d(t,{BR:()=>l,Ej:()=>f,QV:()=>d,XI:()=>u});var n=r(74905),i=r(24326),o=r(37025),a=r(83820),s=r(66875);const c=new a.Logger(s.i);function l(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let o in n){const a=e.slice();a.push(o);try{r(a,n[o])}catch(i){t.push({path:a,error:i})}}};return r([],e),t}class u{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){c.throwArgumentError(e,this.localName,t)}}class d{constructor(e){(0,o.defineReadOnly)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,n.concat)(e._data))}writeBytes(e){let t=(0,n.arrayify)(e);const r=t.length%this.wordSize;return r&&(t=(0,n.concat)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.arrayify)(i.O$.from(e));return t.length>this.wordSize&&c.throwError("value out-of-bounds",a.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.concat)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class f{constructor(e,t,r,i){(0,o.defineReadOnly)(this,"_data",(0,n.arrayify)(e)),(0,o.defineReadOnly)(this,"wordSize",t||32),(0,o.defineReadOnly)(this,"_coerceFunc",r),(0,o.defineReadOnly)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.hexlify)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):f.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:c.throwError("data out-of-bounds",a.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new f(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}},31645:(e,t,r)=>{"use strict";r.d(t,{HY:()=>v,IC:()=>S,QV:()=>y,Xg:()=>_,YW:()=>E,_R:()=>m,pc:()=>h});var n=r(24326),i=r(37025),o=r(83820),a=r(66875);const s=new o.Logger(a.i),c={};let l={calldata:!0,memory:!0,storage:!0},u={calldata:!0,memory:!0};function d(e,t){if("bytes"===e||"string"===e){if(l[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&u[t])return!0;return(l[t]||"payable"===t)&&s.throwArgumentError("invalid modifier","name",t),!1}function f(e,t){for(let r in t)(0,i.defineReadOnly)(e,r,t[r])}const h=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class m{constructor(e,t){e!==c&&s.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),f(this,t);let r=this.type.match(p);f(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:m.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==h.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===h.full?", ":",")+")"):t+=this.type,e!==h.sighash&&(!0===this.indexed&&(t+=" indexed"),e===h.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"===typeof e?m.fromString(e,t):m.fromObject(e)}static fromObject(e){return m.isParamType(e)?e:new m(c,{name:e.name||null,type:A(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(m.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){s.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;sm.fromString(e,t)))}class v{constructor(e,t){e!==c&&s.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),f(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return v.isFragment(e)?e:"string"===typeof e?v.fromString(e):v.fromObject(e)}static fromObject(e){if(v.isFragment(e))return e;switch(e.type){case"function":return E.fromObject(e);case"event":return y.fromObject(e);case"constructor":return _.fromObject(e);case"error":return S.fromObject(e);case"fallback":case"receive":return null}return s.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?y.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?E.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?_.fromString(e.trim()):"error"===e.split(" ")[0]?S.fromString(e.substring(5).trim()):s.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class y extends v{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"===typeof e?y.fromString(e):y.fromObject(e)}static fromObject(e){if(y.isEventFragment(e))return e;"event"!==e.type&&s.throwArgumentError("invalid event object","value",e);const t={name:C(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(m.fromObject):[],type:"event"};return new y(c,t)}static fromString(e){let t=e.match(I);t||s.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:s.warn("unknown modifier: "+e)}})),y.fromObject({name:t[1].trim(),anonymous:r,inputs:g(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function b(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&s.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||s.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.O$.from(r[1]),r[0]):e}function w(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function x(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&s.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&s.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||s.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&s.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&s.throwArgumentError("unable to determine stateMutability","value",e),t}class _ extends v{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===h.sighash&&s.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"===typeof e?_.fromString(e):_.fromObject(e)}static fromObject(e){if(_.isConstructorFragment(e))return e;"constructor"!==e.type&&s.throwArgumentError("invalid constructor object","value",e);let t=x(e);t.constant&&s.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new _(c,r)}static fromString(e){let t={type:"constructor"},r=(e=b(e,t)).match(I);return r&&"constructor"===r[1].trim()||s.throwArgumentError("invalid constructor string","value",e),t.inputs=g(r[2].trim(),!1),w(r[3].trim(),t),_.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class E extends _{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"===typeof e?E.fromString(e):E.fromObject(e)}static fromObject(e){if(E.isFunctionFragment(e))return e;"function"!==e.type&&s.throwArgumentError("invalid function object","value",e);let t=x(e);const r={type:e.type,name:C(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(m.fromObject):[],outputs:e.outputs?e.outputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new E(c,r)}static fromString(e){let t={type:"function"},r=(e=b(e,t)).split(" returns ");r.length>2&&s.throwArgumentError("invalid function string","value",e);let n=r[0].match(I);if(n||s.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&C(t.name),t.inputs=g(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(I);""==n[1].trim()&&""==n[3].trim()||s.throwArgumentError("unexpected tokens","value",e),t.outputs=g(n[2],!1)}else t.outputs=[];return E.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function k(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||s.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class S extends v{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",t.trim()}static from(e){return"string"===typeof e?S.fromString(e):S.fromObject(e)}static fromObject(e){if(S.isErrorFragment(e))return e;"error"!==e.type&&s.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:C(e.name),inputs:e.inputs?e.inputs.map(m.fromObject):[]};return k(new S(c,t))}static fromString(e){let t={type:"error"},r=e.match(I);return r||s.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&C(t.name),t.inputs=g(r[2],!1),k(S.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function A(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const M=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function C(e){return e&&e.match(M)||s.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const I=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},53689:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>i.R,ConstructorFragment:()=>n.Xg,ErrorFragment:()=>n.IC,EventFragment:()=>n.QV,FormatTypes:()=>n.pc,Fragment:()=>n.HY,FunctionFragment:()=>n.YW,Indexed:()=>o.Hk,Interface:()=>o.vU,LogDescription:()=>o.CC,ParamType:()=>n._R,TransactionDescription:()=>o.vk,checkResultErrors:()=>a.BR,defaultAbiCoder:()=>i.$});var n=r(31645),i=r(11409),o=r(28081),a=r(8767)},28081:(e,t,r)=>{"use strict";r.d(t,{CC:()=>p,Hk:()=>v,vU:()=>w,vk:()=>m});var n=r(87243),i=r(24326),o=r(74905),a=r(86507),s=r(15084),c=r(37025),l=r(11409),u=r(31645),d=r(83820),f=r(66875);const h=new d.Logger(f.i);class p extends c.Description{}class m extends c.Description{}class g extends c.Description{}class v extends c.Description{static isIndexed(e){return!(!e||!e._isIndexed)}}const y={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function b(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class w{constructor(e){let t=[];t="string"===typeof e?JSON.parse(e):e,(0,c.defineReadOnly)(this,"fragments",t.map((e=>u.HY.from(e))).filter((e=>null!=e))),(0,c.defineReadOnly)(this,"_abiCoder",(0,c.getStatic)(new.target,"getAbiCoder")()),(0,c.defineReadOnly)(this,"functions",{}),(0,c.defineReadOnly)(this,"errors",{}),(0,c.defineReadOnly)(this,"events",{}),(0,c.defineReadOnly)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void h.warn("duplicate definition - constructor"):void(0,c.defineReadOnly)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?h.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,c.defineReadOnly)(this,"deploy",u.Xg.from({payable:!1,type:"constructor"})),(0,c.defineReadOnly)(this,"_isInterface",!0)}format(e){e||(e=u.pc.full),e===u.pc.sighash&&h.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===u.pc.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return l.$}static getAddress(e){return(0,n.getAddress)(e)}static getSighash(e){return(0,o.hexDataSlice)((0,a.id)(e.format()),0,4)}static getEventTopic(e){return(0,a.id)(e.format())}getFunction(e){if((0,o.isHexString)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];h.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching function","name",t):r.length>1&&h.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[u.YW.fromString(e).format()];return t||h.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];h.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching event","name",t):r.length>1&&h.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[u.QV.fromString(e).format()];return t||h.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,o.isHexString)(e)){const t=(0,c.getStatic)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}h.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching error","name",t):r.length>1&&h.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[u.YW.fromString(e).format()];return t||h.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"===typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(r){throw t}}return(0,c.getStatic)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"===typeof e&&(e=this.getEvent(e)),(0,c.getStatic)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"===typeof e&&(e=this.getError(e));const r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"===typeof e&&(e=this.getError(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"===typeof e&&(e=this.getFunction(e));const r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"===typeof e&&(e=this.getFunction(e));let r=(0,o.arrayify)(t),n=null,i="",a=null,s=null,c=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(l){}break;case 4:{const e=(0,o.hexlify)(r.slice(0,4)),t=y[e];if(t)a=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,c=t.signature,t.reason&&(n=a[0]),"Error"===s?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:"Panic"===s&&(i=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{const t=this.getError(e);a=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,c=t.format()}catch(l){}break}}return h.throwError("call revert exception"+i,d.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.hexlify)(t),errorArgs:a,errorName:s,errorSignature:c,reason:n})}encodeFunctionResult(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,o.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&h.throwError("too many arguments for "+e.format(),d.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?(0,a.id)(t):"bytes"===e.type?(0,s.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=i.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,o.hexZeroPad)((0,o.hexlify)(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?h.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>n(o,e)))):r.push(n(o,t)):null!=t&&h.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"===typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&h.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const c=t[o];if(e.indexed)if("string"===e.type)r.push((0,a.id)(c));else if("bytes"===e.type)r.push((0,s.keccak256)(c));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[c]))}else n.push(e),i.push(c)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"===typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t||h.throwError("fragment/topic mismatch",d.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],a=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(u._R.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(n.push(e),a.push(!1)):(i.push(e),a.push(!1))}));let s=null!=r?this._abiCoder.decode(n,(0,o.concat)(r)):null,c=this._abiCoder.decode(i,t,!0),l=[],f=0,p=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)l[t]=new v({_isIndexed:!0,hash:null});else if(a[t])l[t]=new v({_isIndexed:!0,hash:s[p++]});else try{l[t]=s[p++]}catch(r){l[t]=r}else try{l[t]=c[f++]}catch(r){l[t]=r}if(e.name&&null==l[e.name]){const r=l[t];r instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw b(`property ${JSON.stringify(e.name)}`,r)}}):l[e.name]=r}}));for(let o=0;o{throw b(`index ${o}`,e)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new m({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:i.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new p({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,o.hexlify)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new g({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}},43169:(e,t,r)=>{"use strict";r.d(t,{Sg:()=>c,zt:()=>l});var n=r(24326),i=r(37025),o=r(83820);var a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const s=new o.Logger("abstract-provider/5.7.0");class c extends i.Description{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class l{constructor(){s.checkAbstract(new.target,l),(0,i.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return a(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield(0,i.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,o=null,a=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,a=n.O$.from("1500000000"),o=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:a,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}},47818:(e,t,r)=>{"use strict";r.d(t,{E:()=>l,b:()=>u});var n=r(37025),i=r(83820);var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const a=new i.Logger("abstract-signer/5.7.0"),s=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],c=[i.Logger.errors.INSUFFICIENT_FUNDS,i.Logger.errors.NONCE_EXPIRED,i.Logger.errors.REPLACEMENT_UNDERPRICED];class l{constructor(){a.checkAbstract(new.target,l),(0,n.defineReadOnly)(this,"_isSigner",!0)}getBalance(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const r in e)-1===s.indexOf(r)&&a.throwArgumentError("invalid transaction key: "+r,"transaction",e);const t=(0,n.shallowCopy)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&a.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return o(this,void 0,void 0,(function*(){const t=yield(0,n.resolveProperties)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&a.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||a.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):a.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&a.throwError("network does not support EIP-1559",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):a.throwError("failed to get consistent fee data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(c.indexOf(e.code)>=0)throw e;return a.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&a.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield(0,n.resolveProperties)(t)}))}_checkProvider(e){this.provider||a.throwError("missing provider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class u extends l{constructor(e,t){super(),(0,n.defineReadOnly)(this,"address",e),(0,n.defineReadOnly)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{a.throwError(e,i.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new u(this.address,e)}}},87243:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getAddress:()=>h,getContractAddress:()=>g,getCreate2Address:()=>v,getIcapAddress:()=>m,isAddress:()=>p});var n=r(74905),i=r(24326),o=r(15084),a=r(69139);const s=new(r(83820).Logger)("address/5.7.0");function c(e){(0,n.isHexString)(e,20)||s.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=t[n].charCodeAt(0);const i=(0,n.arrayify)((0,o.keccak256)(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(t[n]=t[n].toUpperCase()),(15&i[n>>1])>=8&&(t[n+1]=t[n+1].toUpperCase());return"0x"+t.join("")}const l={};for(let y=0;y<10;y++)l[String(y)]=String(y);for(let y=0;y<26;y++)l[String.fromCharCode(65+y)]=String(10+y);const u=Math.floor((d=9007199254740991,Math.log10?Math.log10(d):Math.log(d)/Math.LN10));var d;function f(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>l[e])).join("");for(;t.length>=u;){let e=t.substring(0,u);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function h(e){let t=null;if("string"!==typeof e&&s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&s.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==f(e)&&s.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=c("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function p(e){try{return h(e),!0}catch(t){}return!1}function m(e){let t=(0,i.t2)(h(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+f("XE00"+t)+t}function g(e){let t=null;try{t=h(e.from)}catch(c){s.throwArgumentError("missing from address","transaction",e)}const r=(0,n.stripZeros)((0,n.arrayify)(i.O$.from(e.nonce).toHexString()));return h((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))}function v(e,t,r){return 32!==(0,n.hexDataLength)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),h((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",h(e),t,r])),12))}},29204:(e,t,r)=>{"use strict";r.d(t,{J:()=>i,c:()=>o});var n=r(74905);function i(e){e=atob(e);const t=[];for(let r=0;r{"use strict";r.r(t),r.d(t,{decode:()=>n.J,encode:()=>n.c});var n=r(29204)},75200:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Base32:()=>a,Base58:()=>s,BaseX:()=>o});var n=r(74905),i=r(37025);class o{constructor(e){(0,i.defineReadOnly)(this,"alphabet",e),(0,i.defineReadOnly)(this,"base",e.length),(0,i.defineReadOnly)(this,"_alphabetMap",{}),(0,i.defineReadOnly)(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(e%this.base),e=e/this.base|0}let i="";for(let n=0;0===t[n]&&n=0;--n)i+=this.alphabet[r[n]];return i}decode(e){if("string"!==typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r{"use strict";r.d(t,{i:()=>n});const n="bignumber/5.7.0"},24326:(e,t,r)=>{"use strict";r.d(t,{O$:()=>p,Zm:()=>f,g$:()=>b,t2:()=>w});var n=r(45081),i=r.n(n),o=r(74905),a=r(83820),s=r(27612),c=i().BN;const l=new a.Logger(s.i),u={},d=9007199254740991;function f(e){return null!=e&&(p.isBigNumber(e)||"number"===typeof e&&e%1===0||"string"===typeof e&&!!e.match(/^-?[0-9]+$/)||(0,o.isHexString)(e)||"bigint"===typeof e||(0,o.isBytes)(e))}let h=!1;class p{constructor(e,t){e!==u&&l.throwError("cannot call constructor directly; use BigNumber.from",a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return g(v(this).fromTwos(e))}toTwos(e){return g(v(this).toTwos(e))}abs(){return"-"===this._hex[0]?p.from(this._hex.substring(1)):this}add(e){return g(v(this).add(v(e)))}sub(e){return g(v(this).sub(v(e)))}div(e){return p.from(e).isZero()&&y("division-by-zero","div"),g(v(this).div(v(e)))}mul(e){return g(v(this).mul(v(e)))}mod(e){const t=v(e);return t.isNeg()&&y("division-by-zero","mod"),g(v(this).umod(t))}pow(e){const t=v(e);return t.isNeg()&&y("negative-power","pow"),g(v(this).pow(t))}and(e){const t=v(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","and"),g(v(this).and(t))}or(e){const t=v(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","or"),g(v(this).or(t))}xor(e){const t=v(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","xor"),g(v(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&y("negative-width","mask"),g(v(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&y("negative-width","shl"),g(v(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&y("negative-width","shr"),g(v(this).shrn(e))}eq(e){return v(this).eq(v(e))}lt(e){return v(this).lt(v(e))}lte(e){return v(this).lte(v(e))}gt(e){return v(this).gt(v(e))}gte(e){return v(this).gte(v(e))}isNegative(){return"-"===this._hex[0]}isZero(){return v(this).isZero()}toNumber(){try{return v(this).toNumber()}catch(e){y("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return l.throwError("this platform does not support BigInt",a.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,l.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?l.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.Logger.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",a.Logger.errors.UNEXPECTED_ARGUMENT,{})),v(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof p)return e;if("string"===typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new p(u,m(e)):e.match(/^-?[0-9]+$/)?new p(u,m(new c(e))):l.throwArgumentError("invalid BigNumber string","value",e);if("number"===typeof e)return e%1&&y("underflow","BigNumber.from",e),(e>=d||e<=-d)&&y("overflow","BigNumber.from",e),p.from(String(e));const t=e;if("bigint"===typeof t)return p.from(t.toString());if((0,o.isBytes)(t))return p.from((0,o.hexlify)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"===typeof e)return p.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"===typeof e&&((0,o.isHexString)(e)||"-"===e[0]&&(0,o.isHexString)(e.substring(1))))return p.from(e)}return l.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function m(e){if("string"!==typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&l.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return p.from(m(e))}function v(e){const t=p.from(e).toHexString();return"-"===t[0]?new c("-"+t.substring(3),16):new c(t.substring(2),16)}function y(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),l.throwError(e,a.Logger.errors.NUMERIC_FAULT,n)}function b(e){return new c(e,36).toString(16)}function w(e){return new c(e,16).toString(36)}},50853:(e,t,r)=>{"use strict";r.d(t,{Ox:()=>m,S5:()=>p,xs:()=>v});var n=r(74905),i=r(83820),o=r(27612),a=r(24326);const s=new i.Logger(o.i),c={},l=a.O$.from(0),u=a.O$.from(-1);function d(e,t,r,n){const o={fault:t,operation:r};return void 0!==n&&(o.value=n),s.throwError(e,i.Logger.errors.NUMERIC_FAULT,o)}let f="0";for(;f.length<256;)f+=f;function h(e){if("number"!==typeof e)try{e=a.O$.from(e).toNumber()}catch(t){}return"number"===typeof e&&e>=0&&e<=256&&!(e%1)?"1"+f.substring(0,e):s.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);const r=h(t),n=(e=a.O$.from(e)).lt(l);n&&(e=e.mul(u));let i=e.mod(r).toString();for(;i.length2&&s.throwArgumentError("too many decimal points","value",e);let o=i[0],c=i[1];for(o||(o="0"),c||(c="0");"0"===c[c.length-1];)c=c.substring(0,c.length-1);for(c.length>r.length-1&&d("fractional component exceeds decimals","underflow","parseFixed"),""===c&&(c="0");c.lengthnull==e[t]?n:(typeof e[t]!==r&&s.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&s.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&s.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new g(c,t,r,n)}}class v{constructor(e,t,r,n){e!==c&&s.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&s.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return v.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return v.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return v.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return v.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=v.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(y.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=v.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(y.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&s.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=v.from("1"+f.substring(0,e),this.format),n=b.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&s.throwArgumentError("invalid byte width","width",e);const t=a.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,n.hexZeroPad)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return v.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,a.Zm)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),v.fromString(p(e,t),g.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=g.from(t),i=m(e,r.decimals);!r.signed&&i.lt(l)&&d("unsigned value cannot be negative","overflow","value",e);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.hexZeroPad)(o,r.width/8));const a=p(i,r.decimals);return new v(c,o,a,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=g.from(t);if((0,n.arrayify)(e).length>r.width/8)throw new Error("overflow");let i=a.O$.from(e);r.signed&&(i=i.fromTwos(r.width));const o=i.toTwos((r.signed?0:1)+r.width).toHexString(),s=p(i,r.decimals);return new v(c,o,s,r)}static from(e,t){if("string"===typeof e)return v.fromString(e,t);if((0,n.isBytes)(e))return v.fromBytes(e,t);try{return v.fromValue(e,0,t)}catch(r){if(r.code!==i.Logger.errors.INVALID_ARGUMENT)throw r}return s.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const y=v.from(1),b=v.from("0.5")},74905:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arrayify:()=>l,concat:()=>u,hexConcat:()=>y,hexDataLength:()=>g,hexDataSlice:()=>v,hexStripZeros:()=>w,hexValue:()=>b,hexZeroPad:()=>x,hexlify:()=>m,isBytes:()=>c,isBytesLike:()=>a,isHexString:()=>h,joinSignature:()=>E,splitSignature:()=>_,stripZeros:()=>d,zeroPad:()=>f});const n=new(r(83820).Logger)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return h(e)&&!(e.length%2)||c(e)}function s(e){return"number"===typeof e&&e==e&&e%1===0}function c(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function l(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const i=[];for(let e=0;el(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),o(n)}function d(e){let t=l(e);if(0===t.length)return t;let r=0;for(;rt&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function h(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const p="0123456789abcdef";function m(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=p[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){let t="0x";for(let r=0;r>4]+p[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function g(e){if("string"!==typeof e)e=m(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function v(e,t,r){return"string"!==typeof e?e=m(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function y(e){let t="0x";return e.forEach((e=>{t+=m(e).substring(2)})),t}function b(e){const t=w(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!==typeof e&&(e=m(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function _(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){let r=l(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=f(l(t._vs),32);t._vs=m(r);const i=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=m(r);null==t.s?t.s=o:t.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=x(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=x(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=l(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const i=m(r);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=x(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function E(e){return m(u([(e=_(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},4767:(e,t,r)=>{"use strict";r.d(t,{$B:()=>u,Bz:()=>l,Ce:()=>c,PS:()=>d,Py:()=>s,_Y:()=>o,fh:()=>a,tL:()=>i});var n=r(24326);const i=n.O$.from(-1),o=n.O$.from(0),a=n.O$.from(1),s=n.O$.from(2),c=n.O$.from("1000000000000000000"),l=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),u=n.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),d=n.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},826:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},51090:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="hash/5.7.0"},86507:(e,t,r)=>{"use strict";r.d(t,{id:()=>o});var n=r(15084),i=r(8962);function o(e){return(0,n.keccak256)((0,i.Y0)(e))}},4893:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_TypedDataEncoder:()=>a.E,dnsEncode:()=>i.Kn,ensNormalize:()=>i.w3,hashMessage:()=>o.r,id:()=>n.id,isValidName:()=>i.r1,messagePrefix:()=>o.B,namehash:()=>i.VM});var n=r(86507),i=r(59565),o=r(17026),a=r(71341)},17026:(e,t,r)=>{"use strict";r.d(t,{B:()=>a,r:()=>s});var n=r(74905),i=r(15084),o=r(8962);const a="\x19Ethereum Signed Message:\n";function s(e){return"string"===typeof e&&(e=(0,o.Y0)(e)),(0,i.keccak256)((0,n.concat)([(0,o.Y0)(a),(0,o.Y0)(String(e.length)),e]))}},59565:(e,t,r)=>{"use strict";r.d(t,{Kn:()=>L,w3:()=>R,r1:()=>N,VM:()=>B});var n=r(74905),i=r(8962),o=r(15084),a=r(83820),s=r(51090);function c(e,t){null==t&&(t=1);const r=[],n=r.forEach,i=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function l(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let w=1;w>--c&1}const d=Math.pow(2,31),f=d>>>1,h=f>>1,p=d-1;let m=0;for(let w=0;w<31;w++)m=m<<1|u();let g=[],v=0,y=d;for(;;){let e=Math.floor(((m-v+1)*i-1)/y),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|u(),a=a<<1^f,s=(s^f)<<1|f|1;v=a,y=1+s-a}let b=n-4;return g.map((t=>{switch(t-b){case 3:return b+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return b+256+(e[s++]<<8|e[s++]);case 1:return b+e[s++];default:return t-1}}))}(e))}function u(e){return 1&e?~e>>1:e>>1}function d(e,t){let r=Array(e);for(let n=0,i=-1;nt[e])):r}function p(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;in[t].push(e)));return n}function m(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return c(p(i.length,1+e,t).map(((e,t)=>{const o=e[0],a=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,a.map((e=>e+i))]}))})))}function g(e,t){return p(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const v=l((0,r(29204).J)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),y=new Set(h(v)),b=new Set(h(v)),w=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(m(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(g(r,e))}return function(e){const t={};for(let r=0;re-t));return function r(){let n=[];for(;;){let i=h(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let a=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:a,save:1==i,check:2==i}}()}(v),_=45,E=95;function k(e){return(0,i.XL)(e)}function S(e){return e.filter((e=>65039!=e))}function A(e){for(let r of e.split(".")){let e=k(r);try{for(let t=e.lastIndexOf(E)-1;t>=0;t--)if(e[t]!==E)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===_&&e[3]===_)throw new Error("invalid label extension")}catch(t){throw new Error(`Invalid label "${r}": ${t.message}`)}}return e}function M(e){return A(function(e,t){let r=k(e).reverse(),n=[];for(;r.length;){let e=C(r);if(e){n.push(...t(e));continue}let i=r.pop();if(y.has(i)){n.push(i);continue}if(b.has(i))continue;let o=w[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return A(function(e){return e.normalize("NFC")}(String.fromCodePoint(...n)))}(e,S))}function C(e,t){var r;let n,i,o=x,a=[],s=e.length;for(t&&(t.length=0);s;){let c=e[--s];if(o=null===(r=o.branches.find((e=>e.set.has(c))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=c;else if(o.check&&c===i)break;a.push(c),o.fe0f&&(a.push(65039),s>0&&65039==e[s-1]&&s--),o.valid&&(n=a.slice(),2==o.valid&&n.splice(1,1),t&&t.push(...e.slice(s).reverse()),e.length=s)}return n}const I=new a.Logger(s.i),T=new Uint8Array(32);function P(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function O(e){const t=(0,i.Y0)(M(e)),r=[];if(0===e.length)return r;let n=0;for(let i=0;i=t.length)throw new Error("invalid ENS name; empty component");return r.push(P(t.slice(n))),r}function R(e){return O(e).map((e=>(0,i.ZN)(e))).join(".")}function N(e){try{return 0!==O(e).length}catch(t){}return!1}function B(e){"string"!==typeof e&&I.throwArgumentError("invalid ENS name; not a string","name",e);let t=T;const r=O(e);for(;r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)}function L(e){return(0,n.hexlify)((0,n.concat)(O(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}T.fill(0)},71341:(e,t,r)=>{"use strict";r.d(t,{E:()=>A});var n=r(87243),i=r(24326),o=r(74905),a=r(15084),s=r(37025),c=r(83820),l=r(51090),u=r(86507),d=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const f=new c.Logger(l.i),h=new Uint8Array(32);h.fill(0);const p=i.O$.from(-1),m=i.O$.from(0),g=i.O$.from(1),v=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const y=(0,o.hexZeroPad)(g.toHexString(),32),b=(0,o.hexZeroPad)(m.toHexString(),32),w={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},x=["name","version","chainId","verifyingContract","salt"];function _(e){return function(t){return"string"!==typeof t&&f.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const E={name:_("name"),version:_("version"),chainId:function(e){try{return i.O$.from(e).toString()}catch(t){}return f.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(t){}return f.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,o.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,o.hexlify)(t)}catch(t){}return f.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function k(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!==0||n>256||t[2]&&t[2]!==String(n))&&f.throwArgumentError("invalid numeric width","type",e);const a=v.mask(r?n-1:n),s=r?a.add(g).mul(p):m;return function(t){const r=i.O$.from(t);return(r.lt(s)||r.gt(a))&&f.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,o.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&f.throwArgumentError("invalid bytes width","type",e),function(t){return(0,o.arrayify)(t).length!==r&&f.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=(0,o.arrayify)(e),r=t.length%32;return r?(0,o.hexConcat)([t,h.slice(r)]):(0,o.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,o.hexZeroPad)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?y:b};case"bytes":return function(e){return(0,a.keccak256)(e)};case"string":return function(e){return(0,u.id)(e)}}return null}function S(e,t){return`${e}(${t.map((e=>{let{name:t,type:r}=e;return r+" "+t})).join(",")})`}class A{constructor(e){(0,s.defineReadOnly)(this,"types",Object.freeze((0,s.deepCopy)(e))),(0,s.defineReadOnly)(this,"_encoderCache",{}),(0,s.defineReadOnly)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const o in e){const n={};e[o].forEach((i=>{n[i.name]&&f.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(o)}`,"types",e),n[i.name]=!0;const a=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===o&&f.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e);k(a)||(r[a]||f.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",e),r[a].push(o),t[o][a]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?f.throwArgumentError("missing primary type","types",e):i.length>1&&f.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,s.defineReadOnly)(this,"primaryType",i[0]),function i(o,a){a[o]&&f.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),a[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,a),Object.keys(a).forEach((t=>{n[t][e]=!0})))})),delete a[o]}(this.primaryType,{});for(const o in n){const t=Object.keys(n[o]);t.sort(),this._types[o]=S(o,e[o])+t.map((t=>S(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=k(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(a.keccak256)),(0,a.keccak256)((0,o.hexConcat)(i))}}const r=this.types[e];if(r){const t=(0,u.id)(this._types[e]);return e=>{const n=r.map((t=>{let{name:r,type:n}=t;const i=this.getEncoder(n)(e[r]);return this._types[n]?(0,a.keccak256)(i):i}));return n.unshift(t),(0,o.hexConcat)(n)}}return f.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||f.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,a.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(k(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,n)=>{let{name:i,type:o}=n;return e[i]=this._visit(o,t[i],r),e}),{}):f.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new A(e)}static getPrimaryType(e){return A.from(e).primaryType}static hashStruct(e,t,r){return A.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=w[r];n||f.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>x.indexOf(e.name)-x.indexOf(t.name))),A.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,o.hexConcat)(["0x1901",A.hashDomain(e),A.from(t).hash(r)])}static hash(e,t,r){return(0,a.keccak256)(A.encode(e,t,r))}static resolveNames(e,t,r,n){return d(this,void 0,void 0,(function*(){e=(0,s.shallowCopy)(e);const i={};e.verifyingContract&&!(0,o.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const a=A.from(t);a.visit(r,((e,t)=>("address"!==e||(0,o.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=a.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){A.hashDomain(e);const n={},a=[];x.forEach((t=>{const r=e[t];null!=r&&(n[t]=E[t](r),a.push({name:t,type:w[t]}))}));const c=A.from(t),l=(0,s.shallowCopy)(t);return l.EIP712Domain?f.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):l.EIP712Domain=a,c.encode(r),{types:l,domain:n,primaryType:c.primaryType,message:c.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,o.hexlify)((0,o.arrayify)(t));if(e.match(/^u?int/))return i.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&f.throwArgumentError("invalid string","value",t),t}return f.throwArgumentError("unsupported type","type",e)}))}}}},49465:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HDNode:()=>k,defaultPath:()=>E,entropyToMnemonic:()=>M,getAccountPath:()=>I,isValidMnemonic:()=>C,mnemonicToEntropy:()=>A,mnemonicToSeed:()=>S});var n=r(75200),i=r(74905),o=r(24326),a=r(8962),s=r(40861),c=r(37025),l=r(35046),u=r(78604),d=r(47244),f=r(62063),h=r(80095);const p=new(r(83820).Logger)("hdnode/5.7.0"),m=o.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),g=(0,a.Y0)("Bitcoin seed"),v=2147483648;function y(e){return(1<=256)throw new Error("Depth too large!");return w((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new k(_,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~v));const r=new Uint8Array(37);if(e&v){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,i.arrayify)(this.privateKey),1),t&&(t+="'")}else r.set((0,i.arrayify)(this.publicKey));for(let i=24;i>=0;i-=8)r[33+(i>>3)]=e>>24-i&255;const n=(0,i.arrayify)((0,u.Gy)(d.p.sha512,this.chainCode,r)),a=n.slice(0,32),s=n.slice(32);let c=null,f=null;if(this.privateKey)c=b(o.O$.from(a).add(this.privateKey).mod(m));else{f=new l.SigningKey((0,i.hexlify)(a))._addPoint(this.publicKey)}let h=t;const p=this.mnemonic;return p&&(h=Object.freeze({phrase:p.phrase,path:t,locale:p.locale||"en"})),new k(_,c,f,this.fingerprint,b(s),e,this.depth+1,h)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let n=0;n=v)throw new Error("invalid path index - "+e);r=r._derive(v+t)}else{if(!e.match(/^[0-9]+$/))throw new Error("invalid path component - "+e);{const t=parseInt(e);if(t>=v)throw new Error("invalid path index - "+e);r=r._derive(t)}}}return r}static _fromSeed(e,t){const r=(0,i.arrayify)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,i.arrayify)((0,u.Gy)(d.p.sha512,g,r));return new k(_,b(n.slice(0,32)),null,"0x00000000",b(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=M(A(e,r=x(r)),r),k._fromSeed(S(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return k._fromSeed(e,null)}static fromExtendedKey(e){const t=n.Base58.decode(e);82===t.length&&w(t.slice(0,78))===e||p.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],o=(0,i.hexlify)(t.slice(5,9)),a=parseInt((0,i.hexlify)(t.slice(9,13)).substring(2),16),s=(0,i.hexlify)(t.slice(13,45)),c=t.slice(45,78);switch((0,i.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new k(_,null,(0,i.hexlify)(c),o,s,a,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==c[0])break;return new k(_,(0,i.hexlify)(c.slice(1)),null,o,s,a,r,null)}return p.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function S(e,t){t||(t="");const r=(0,a.Y0)("mnemonic"+t,a.Uj.NFKD);return(0,s.n)((0,a.Y0)(e,a.Uj.NFKD),r,2048,64,"sha512")}function A(e,t){t=x(t),p.checkNormalize();const r=t.split(e);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=(0,i.arrayify)(new Uint8Array(Math.ceil(11*r.length/8)));let o=0;for(let i=0;i>3]|=1<<7-o%8),o++}const a=32*r.length/3,s=y(r.length/3);if(((0,i.arrayify)((0,u.JQ)(n.slice(0,a/8)))[0]&s)!==(n[n.length-1]&s))throw new Error("invalid checksum");return(0,i.hexlify)(n.slice(0,a/8))}function M(e,t){if(t=x(t),(e=(0,i.arrayify)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let i=0;i8?(r[r.length-1]<<=8,r[r.length-1]|=e[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[i]>>8-n,r.push(e[i]&(1<<8-n)-1),n+=3);const o=e.length/4,a=(0,i.arrayify)((0,u.JQ)(e))[0]&y(o);return r[r.length-1]<<=o,r[r.length-1]|=a>>8-o,t.join(r.map((e=>t.getWord(e))))}function C(e,t){try{return A(e,t),!0}catch(r){}return!1}function I(e){return("number"!==typeof e||e<0||e>=v||e%1)&&p.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}},93089:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="json-wallets/5.7.0"},906:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptCrowdsale:()=>g,decryptJsonWallet:()=>b,decryptJsonWalletSync:()=>w,decryptKeystore:()=>y.pe,decryptKeystoreSync:()=>y.hb,encryptKeystore:()=>y.HI,getJsonWalletAddress:()=>v.Rb,isCrowdsaleWallet:()=>v.LW,isKeystoreWallet:()=>v.aO});var n=r(30084),i=r.n(n),o=r(87243),a=r(74905),s=r(15084),c=r(40861),l=r(8962),u=r(37025),d=r(83820),f=r(93089),h=r(55711);const p=new d.Logger(f.i);class m extends u.Description{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount)}}function g(e,t){const r=JSON.parse(e);t=(0,h.Ij)(t);const n=(0,o.getAddress)((0,h.gx)(r,"ethaddr")),u=(0,h.p3)((0,h.gx)(r,"encseed"));u&&u.length%16===0||p.throwArgumentError("invalid encseed","json",e);const d=(0,a.arrayify)((0,c.n)(t,t,2e3,32,"sha256")).slice(0,16),f=u.slice(0,16),g=u.slice(16),v=new(i().ModeOfOperation.cbc)(d,f),y=i().padding.pkcs7.strip((0,a.arrayify)(v.decrypt(g)));let b="";for(let i=0;i{"use strict";r.d(t,{LW:()=>i,Rb:()=>a,aO:()=>o});var n=r(87243);function i(e){let t=null;try{t=JSON.parse(e)}catch(r){return!1}return t.encseed&&t.ethaddr}function o(e){let t=null;try{t=JSON.parse(e)}catch(r){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function a(e){if(i(e))try{return(0,n.getAddress)(JSON.parse(e).ethaddr)}catch(t){return null}if(o(e))try{return(0,n.getAddress)(JSON.parse(e).address)}catch(t){return null}return null}},33305:(e,t,r)=>{"use strict";r.d(t,{HI:()=>C,hb:()=>A,pe:()=>M});var n=r(30084),i=r.n(n),o=r(14703),a=r.n(o),s=r(87243),c=r(74905),l=r(49465),u=r(15084),d=r(40861),f=r(43585),h=r(37025),p=r(62063),m=r(55711),g=r(83820),v=r(93089),y=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const b=new g.Logger(v.i);function w(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class x extends h.Description{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount)}}function _(e,t){const r=(0,m.p3)((0,m.gx)(e,"crypto/ciphertext"));if((0,c.hexlify)((0,u.keccak256)((0,c.concat)([t.slice(16,32),r]))).substring(2)!==(0,m.gx)(e,"crypto/mac").toLowerCase())throw new Error("invalid password");const n=function(e,t,r){if("aes-128-ctr"===(0,m.gx)(e,"crypto/cipher")){const n=(0,m.p3)((0,m.gx)(e,"crypto/cipherparams/iv")),o=new(i().Counter)(n),a=new(i().ModeOfOperation.ctr)(t,o);return(0,c.arrayify)(a.decrypt(r))}return null}(e,t.slice(0,16),r);n||b.throwError("unsupported cipher",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=t.slice(32,64),a=(0,p.computeAddress)(n);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),(0,s.getAddress)(t)!==a)throw new Error("address mismatch")}const d={_isKeystoreAccount:!0,address:a,privateKey:(0,c.hexlify)(n)};if("0.1"===(0,m.gx)(e,"x-ethers/version")){const t=(0,m.p3)((0,m.gx)(e,"x-ethers/mnemonicCiphertext")),r=(0,m.p3)((0,m.gx)(e,"x-ethers/mnemonicCounter")),n=new(i().Counter)(r),a=new(i().ModeOfOperation.ctr)(o,n),s=(0,m.gx)(e,"x-ethers/path")||l.defaultPath,u=(0,m.gx)(e,"x-ethers/locale")||"en",h=(0,c.arrayify)(a.decrypt(t));try{const e=(0,l.entropyToMnemonic)(h,u),t=l.HDNode.fromMnemonic(e,null,u).derivePath(s);if(t.privateKey!=d.privateKey)throw new Error("mnemonic mismatch");d.mnemonic=t.mnemonic}catch(f){if(f.code!==g.Logger.errors.INVALID_ARGUMENT||"wordlist"!==f.argument)throw f}}return new x(d)}function E(e,t,r,n,i){return(0,c.arrayify)((0,d.n)(e,t,r,n,i))}function k(e,t,r,n,i){return Promise.resolve(E(e,t,r,n,i))}function S(e,t,r,n,i){const o=(0,m.Ij)(t),a=(0,m.gx)(e,"crypto/kdf");if(a&&"string"===typeof a){const t=function(e,t){return b.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===a.toLowerCase()){const r=(0,m.p3)((0,m.gx)(e,"crypto/kdfparams/salt")),s=parseInt((0,m.gx)(e,"crypto/kdfparams/n")),c=parseInt((0,m.gx)(e,"crypto/kdfparams/r")),l=parseInt((0,m.gx)(e,"crypto/kdfparams/p"));s&&c&&l||t("kdf",a),0!==(s&s-1)&&t("N",s);const u=parseInt((0,m.gx)(e,"crypto/kdfparams/dklen"));return 32!==u&&t("dklen",u),n(o,r,s,c,l,64,i)}if("pbkdf2"===a.toLowerCase()){const n=(0,m.p3)((0,m.gx)(e,"crypto/kdfparams/salt"));let i=null;const a=(0,m.gx)(e,"crypto/kdfparams/prf");"hmac-sha256"===a?i="sha256":"hmac-sha512"===a?i="sha512":t("prf",a);const s=parseInt((0,m.gx)(e,"crypto/kdfparams/c")),c=parseInt((0,m.gx)(e,"crypto/kdfparams/dklen"));return 32!==c&&t("dklen",c),r(o,n,s,c,i)}}return b.throwArgumentError("unsupported key-derivation function","kdf",a)}function A(e,t){const r=JSON.parse(e);return _(r,S(r,t,E,a().syncScrypt))}function M(e,t,r){return y(this,void 0,void 0,(function*(){const n=JSON.parse(e);return _(n,yield S(n,t,k,a().scrypt,r))}))}function C(e,t,r,n){try{if((0,s.getAddress)(e.address)!==(0,p.computeAddress)(e.privateKey))throw new Error("address/privateKey mismatch");if(w(e)){const t=e.mnemonic;if(l.HDNode.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||l.defaultPath).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(A){return Promise.reject(A)}"function"!==typeof r||n||(n=r,r={}),r||(r={});const o=(0,c.arrayify)(e.privateKey),d=(0,m.Ij)(t);let h=null,g=null,v=null;if(w(e)){const t=e.mnemonic;h=(0,c.arrayify)((0,l.mnemonicToEntropy)(t.phrase,t.locale||"en")),g=t.path||l.defaultPath,v=t.locale||"en"}let y=r.client;y||(y="ethers.js");let b=null;b=r.salt?(0,c.arrayify)(r.salt):(0,f.O)(32);let x=null;if(r.iv){if(x=(0,c.arrayify)(r.iv),16!==x.length)throw new Error("invalid iv")}else x=(0,f.O)(16);let _=null;if(r.uuid){if(_=(0,c.arrayify)(r.uuid),16!==_.length)throw new Error("invalid uuid")}else _=(0,f.O)(16);let E=1<<17,k=8,S=1;return r.scrypt&&(r.scrypt.N&&(E=r.scrypt.N),r.scrypt.r&&(k=r.scrypt.r),r.scrypt.p&&(S=r.scrypt.p)),a().scrypt(d,b,E,k,S,64,n).then((t=>{const r=(t=(0,c.arrayify)(t)).slice(0,16),n=t.slice(16,32),a=t.slice(32,64),s=new(i().Counter)(x),l=new(i().ModeOfOperation.ctr)(r,s),d=(0,c.arrayify)(l.encrypt(o)),p=(0,u.keccak256)((0,c.concat)([n,d])),w={address:e.address.substring(2).toLowerCase(),id:(0,m.EH)(_),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,c.hexlify)(x).substring(2)},ciphertext:(0,c.hexlify)(d).substring(2),kdf:"scrypt",kdfparams:{salt:(0,c.hexlify)(b).substring(2),n:E,dklen:32,p:S,r:k},mac:p.substring(2)}};if(h){const e=(0,f.O)(16),t=new(i().Counter)(e),r=new(i().ModeOfOperation.ctr)(a,t),n=(0,c.arrayify)(r.encrypt(h)),o=new Date,s=o.getUTCFullYear()+"-"+(0,m.VP)(o.getUTCMonth()+1,2)+"-"+(0,m.VP)(o.getUTCDate(),2)+"T"+(0,m.VP)(o.getUTCHours(),2)+"-"+(0,m.VP)(o.getUTCMinutes(),2)+"-"+(0,m.VP)(o.getUTCSeconds(),2)+".0Z";w["x-ethers"]={client:y,gethFilename:"UTC--"+s+"--"+w.address,mnemonicCounter:(0,c.hexlify)(e).substring(2),mnemonicCiphertext:(0,c.hexlify)(n).substring(2),path:g,locale:v,version:"0.1"}}return JSON.stringify(w)}))}},55711:(e,t,r)=>{"use strict";r.d(t,{EH:()=>l,Ij:()=>s,VP:()=>a,gx:()=>c,p3:()=>o});var n=r(74905),i=r(8962);function o(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,n.arrayify)(e)}function a(e,t){for(e=String(e);e.length{"use strict";r.r(t),r.d(t,{keccak256:()=>a});var n=r(75502),i=r.n(n),o=r(74905);function a(e){return"0x"+i().keccak_256((0,o.arrayify)(e))}},83820:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ErrorCode:()=>u,LogLevel:()=>l,Logger:()=>f});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=o.default,s=null;const c=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var l,u;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(l||(l={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(u||(u={}));const d="0123456789abcdef";class f{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",e),a>o[r]||console.log.apply(console,t)}debug(){for(var e=arguments.length,t=new Array(e),r=0;r{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=d[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let a="";switch(t){case u.NUMERIC_FAULT:{a="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":a+="-"+t;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case u.CALL_EXCEPTION:case u.INSUFFICIENT_FUNDS:case u.MISSING_NEW:case u.NONCE_EXPIRED:case u.REPLACEMENT_UNDERPRICED:case u.TRANSACTION_REPLACED:case u.UNPREDICTABLE_GAS_LIMIT:a=t}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(r).forEach((function(e){s[e]=r[e]})),s}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,f.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),c&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:c})}checkSafeUint53(e,t){"number"===typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,f.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new f("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?a=t:f.globalLogger().warn("invalid log level - "+e)}static from(e){return new f(e)}}f.errors=u,f.levels=l},40861:(e,t,r)=>{"use strict";r.d(t,{n:()=>o});var n=r(74905),i=r(78604);function o(e,t,r,o,a){let s;e=(0,n.arrayify)(e),t=(0,n.arrayify)(t);let c=1;const l=new Uint8Array(o),u=new Uint8Array(t.length+4);let d,f;u.set(t);for(let h=1;h<=c;h++){u[t.length]=h>>24&255,u[t.length+1]=h>>16&255,u[t.length+2]=h>>8&255,u[t.length+3]=255&h;let p=(0,n.arrayify)((0,i.Gy)(a,e,u));s||(s=p.length,f=new Uint8Array(s),c=Math.ceil(o/s),d=o-(c-1)*s),f.set(p);for(let t=1;t{"use strict";r.r(t),r.d(t,{Description:()=>m,checkProperties:()=>l,deepCopy:()=>p,defineReadOnly:()=>a,getStatic:()=>s,resolveProperties:()=>c,shallowCopy:()=>u});var n=r(83820);var i=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const o=new n.Logger("properties/5.7.0");function a(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function s(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function c(e){return i(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function l(e,t){e&&"object"===typeof e||o.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function u(e){const t={};for(const r in e)t[r]=e[r];return t}const d={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function f(e){if(void 0===e||null===e||d[typeof e])return!0;if(Array.isArray(e)||"object"===typeof e){if(!Object.isFrozen(e))return!1;const r=Object.keys(e);for(let n=0;np(e))));if("object"===typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&a(t,r,p(n))}return t}return o.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function p(e){return h(e)}class m{constructor(e){for(const t in e)this[t]=p(e[t])}}},8034:(e,t,r)=>{"use strict";r.r(t),r.d(t,{randomBytes:()=>n.O,shuffled:()=>i.y});var n=r(43585),i=r(96842)},43585:(e,t,r)=>{"use strict";r.d(t,{O:()=>c});var n=r(74905),i=r(83820);const o=new i.Logger("random/5.7.0");const a=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof r.g)return r.g;throw new Error("unable to locate global object")}();let s=a.crypto||a.msCrypto;function c(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return s.getRandomValues(t),(0,n.arrayify)(t)}s&&s.getRandomValues||(o.warn("WARNING: Missing strong random number source"),s={getRandomValues:function(e){return o.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},96842:(e,t,r)=>{"use strict";function n(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}r.d(t,{y:()=>n})},69139:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>f,encode:()=>l});var n=r(74905),i=r(83820);const o=new i.Logger("rlp/5.7.0");function a(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function s(e,t,r){let n=0;for(let i=0;it+1+n&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:a}}function d(e,t){if(0===e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});const n=s(e,t+1,r);return t+1+r+n>e.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});const a=s(e,t+1,r);t+1+r+a>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r+a,result:(0,n.hexlify)(e.slice(t+1+r,t+1+r+a))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:(0,n.hexlify)(e.slice(t+1,t+1+r))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}function f(e){const t=(0,n.arrayify)(e),r=d(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},68208:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SupportedAlgorithm:()=>i.p,computeHmac:()=>n.Gy,ripemd160:()=>n.bP,sha256:()=>n.JQ,sha512:()=>n.o});var n=r(78604),i=r(47244)},78604:(e,t,r)=>{"use strict";r.d(t,{Gy:()=>f,bP:()=>l,JQ:()=>u,o:()=>d});var n=r(99950),i=r.n(n),o=r(74905),a=r(47244),s=r(83820);const c=new s.Logger("sha2/5.7.0");function l(e){return"0x"+i().ripemd160().update((0,o.arrayify)(e)).digest("hex")}function u(e){return"0x"+i().sha256().update((0,o.arrayify)(e)).digest("hex")}function d(e){return"0x"+i().sha512().update((0,o.arrayify)(e)).digest("hex")}function f(e,t,r){return a.p[e]||c.throwError("unsupported algorithm "+e,s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i().hmac(i()[e],(0,o.arrayify)(t)).update((0,o.arrayify)(r)).digest("hex")}},47244:(e,t,r)=>{"use strict";var n;r.d(t,{p:()=>n}),function(e){e.sha256="sha256",e.sha512="sha512"}(n||(n={}))},35046:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SigningKey:()=>K,computePublicKey:()=>Y,recoverPublicKey:()=>G});var n=r(45081),i=r.n(n),o=r(99950),a=r.n(o);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self&&self;function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&r.path)}},e(r,r.exports),r.exports}var c=l;function l(e,t){if(!e)throw new Error(t||"Assertion failed")}l.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var u=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),d=s((function(e,t){var r=t;r.assert=c,r.toArray=u.toArray,r.zero2=u.zero2,r.toHex=u.toHex,r.encode=u.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,l=t.andln(3)+o&3;3===c&&(c=-1),3===l&&(l=-1),a=0===(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==l?c:-c,r[0].push(a),s=0===(1&l)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?l:-l,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new(i())(e,"hex","le")}})),f=d.getNAF,h=d.getJSF,p=d.assert;function m(e,t){this.type=e,this.p=new(i())(t.p,16),this.red=t.prime?i().red(t.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=t.n&&new(i())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var g=m;function v(e,t){this.curve=e,this.type=t,this.precomputed=null}m.prototype.point=function(){throw new Error("Not implemented")},m.prototype.validate=function(){throw new Error("Not implemented")},m.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=f(t,1,this._bitLength),i=(1<=o;c--)a=(a<<1)+n[c];s.push(a)}for(var l=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o=0;s--){for(var c=0;s>=0&&0===o[s];s--)c++;if(s>=0&&c++,a=a.dblp(c),s<0)break;var l=o[s];p(0!==l),a="affine"===e.type?l>0?a.mixedAdd(i[l-1>>1]):a.mixedAdd(i[-l-1>>1].neg()):l>0?a.add(i[l-1>>1]):a.add(i[-l-1>>1].neg())}return"affine"===e.type?a.toP():a},m.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,c=this._wnafT1,l=this._wnafT2,u=this._wnafT3,d=0;for(o=0;o=1;o-=2){var m=o-1,g=o;if(1===c[m]&&1===c[g]){var v=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(v[1]=t[m].add(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].add(t[g].neg())):(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=h(r[m],r[g]);for(d=Math.max(b[0].length,d),u[m]=new Array(d),u[g]=new Array(d),a=0;a=0;o--){for(var k=0;o>=0;){var S=!0;for(a=0;a=0&&k++,_=_.dblp(k),o<0)break;for(a=0;a0?s=l[a][A-1>>1]:A<0&&(s=l[a][-A-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},v.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),l=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(l).neg()}},w.prototype.pointFromX=function(e,t){(e=new(i())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},_.prototype.isInfinity=function(){return this.inf},_.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},_.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},_.prototype.getX=function(){return this.x.fromRed()},_.prototype.getY=function(){return this.y.fromRed()},_.prototype.mul=function(e){return e=new(i())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},_.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},_.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},_.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},_.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},_.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},y(E,g.BasePoint),w.prototype.jpoint=function(e,t,r){return new E(this,e,t,r)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),u=l.redMul(s),d=n.redMul(l),f=c.redSqr().redIAdd(u).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},E.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),u=r.redMul(c),d=s.redSqr().redIAdd(l).redISub(u).redISub(u),f=s.redMul(u.redISub(d)).redISub(i.redMul(l)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},E.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"":""},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var k=s((function(e,t){var r=t;r.base=g,r.short=x,r.mont=null,r.edwards=null})),S=s((function(e,t){var r,n=t,i=d.assert;function o(e){"short"===e.type?this.curve=new k.short(e):"edwards"===e.type?this.curve=new k.edwards(e):this.curve=new k.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a().sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(c){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function A(e){if(!(this instanceof A))return new A(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=u.toArray(e.entropy,e.entropyEnc||"hex"),r=u.toArray(e.nonce,e.nonceEnc||"hex"),n=u.toArray(e.pers,e.persEnc||"hex");c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var M=A;A.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},A.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=u.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var P=d.assert;function O(e,t){if(e instanceof O)return e;this._importDER(e,t)||(P(e.r&&e.s,"Signature without r or s"),this.r=new(i())(e.r,16),this.s=new(i())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var R=O;function N(){this.place=0}function B(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function L(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}O.prototype._importDER=function(e,t){e=d.toArray(e,t);var r=new N;if(48!==e[r.place++])return!1;var n=B(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=B(e,r);if(!1===o)return!1;var a=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=B(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var c=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new(i())(a),this.s=new(i())(c),this.recoveryParam=null,!0},O.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=L(t),r=L(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];j(n,t.length),(n=n.concat(t)).push(2),j(n,r.length);var i=n.concat(r),o=[48];return j(o,i.length),o=o.concat(i),d.encode(o,e)};var D=function(){throw new Error("unsupported")},F=d.assert;function U(e){if(!(this instanceof U))return new U(e);"string"===typeof e&&(F(Object.prototype.hasOwnProperty.call(S,e),"Unknown curve "+e),e=S[e]),e instanceof S.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var z=U;U.prototype.keyPair=function(e){return new T(this,e)},U.prototype.keyFromPrivate=function(e,t){return T.fromPrivate(this,e,t)},U.prototype.keyFromPublic=function(e,t){return T.fromPublic(this,e,t)},U.prototype.genKeyPair=function(e){e||(e={});for(var t=new M({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||D(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},U.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},U.prototype.sign=function(e,t,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(i())(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),s=e.toArray("be",o),c=new M({hash:this.hash,entropy:a,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new(i())(1)),u=0;;u++){var d=n.k?n.k(u):new(i())(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var f=this.g.mul(d);if(!f.isInfinity()){var h=f.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var m=d.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(f.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new R({r:p,s:m,recoveryParam:g})}}}}}},U.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(i())(e,16)),r=this.keyFromPublic(r,n);var o=(t=new R(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),l=c.mul(e).umod(this.n),u=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),u)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),u)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},U.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new R(t,n);var o=this.n,a=new(i())(e),s=t.r,c=t.s,l=1&r,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");s=u?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=t.r.invm(o),f=o.sub(a).mul(d).umod(o),h=c.mul(d).umod(o);return this.g.mulAdd(f,s,h)},U.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new R(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Z=s((function(e,t){var r=t;r.version="6.5.4",r.utils=d,r.rand=function(){throw new Error("unsupported")},r.curve=k,r.curves=S,r.ec=z,r.eddsa=null})).ec,q=r(74905),H=r(37025);const V=new(r(83820).Logger)("signing-key/5.7.0");let W=null;function $(){return W||(W=new Z("secp256k1")),W}class K{constructor(e){(0,H.defineReadOnly)(this,"curve","secp256k1"),(0,H.defineReadOnly)(this,"privateKey",(0,q.hexlify)(e)),32!==(0,q.hexDataLength)(this.privateKey)&&V.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=$().keyFromPrivate((0,q.arrayify)(this.privateKey));(0,H.defineReadOnly)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,H.defineReadOnly)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,H.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(e){const t=$().keyFromPublic((0,q.arrayify)(this.publicKey)),r=$().keyFromPublic((0,q.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=$().keyFromPrivate((0,q.arrayify)(this.privateKey)),r=(0,q.arrayify)(e);32!==r.length&&V.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,q.splitSignature)({recoveryParam:n.recoveryParam,r:(0,q.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,q.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=$().keyFromPrivate((0,q.arrayify)(this.privateKey)),r=$().keyFromPublic((0,q.arrayify)(Y(e)));return(0,q.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function G(e,t){const r=(0,q.splitSignature)(t),n={r:(0,q.arrayify)(r.r),s:(0,q.arrayify)(r.s)};return"0x"+$().recoverPubKey((0,q.arrayify)(e),n,r.recoveryParam).encode("hex",!1)}function Y(e,t){const r=(0,q.arrayify)(e);if(32===r.length){const e=new K(r);return t?"0x"+$().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,q.hexlify)(r):"0x"+$().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+$().keyFromPublic(r).getPublic(!0,"hex"):(0,q.hexlify)(r):V.throwArgumentError("invalid public or private key","key","[REDACTED]")}},52131:(e,t,r)=>{"use strict";r.r(t),r.d(t,{keccak256:()=>g,pack:()=>m,sha256:()=>v});var n=r(24326),i=r(74905),o=r(15084),a=r(78604),s=r(8962),c=r(83820);const l=new RegExp("^bytes([0-9]+)$"),u=new RegExp("^(u?int)([0-9]*)$"),d=new RegExp("^(.*)\\[([0-9]*)\\]$"),f="0000000000000000000000000000000000000000000000000000000000000000",h=new c.Logger("solidity/5.7.0");function p(e,t,r){switch(e){case"address":return r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t);case"string":return(0,s.Y0)(t);case"bytes":return(0,i.arrayify)(t);case"bool":return t=t?"0x01":"0x00",r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t)}let o=e.match(u);if(o){let a=parseInt(o[2]||"256");return(o[2]&&String(a)!==o[2]||a%8!==0||0===a||a>256)&&h.throwArgumentError("invalid number type","type",e),r&&(a=256),t=n.O$.from(t).toTwos(a),(0,i.zeroPad)(t,a/8)}if(o=e.match(l),o){const n=parseInt(o[1]);return(String(n)!==o[1]||0===n||n>32)&&h.throwArgumentError("invalid bytes type","type",e),(0,i.arrayify)(t).byteLength!==n&&h.throwArgumentError(`invalid value for ${e}`,"value",t),r?(0,i.arrayify)((t+f).substring(0,66)):t}if(o=e.match(d),o&&Array.isArray(t)){const r=o[1];parseInt(o[2]||String(t.length))!=t.length&&h.throwArgumentError(`invalid array length for ${e}`,"value",t);const n=[];return t.forEach((function(e){n.push(p(r,e,!0))})),(0,i.concat)(n)}return h.throwArgumentError("invalid type","type",e)}function m(e,t){e.length!=t.length&&h.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(p(e,t[n]))})),(0,i.hexlify)((0,i.concat)(r))}function g(e,t){return(0,o.keccak256)(m(e,t))}function v(e,t){return(0,a.JQ)(m(e,t))}},29313:(e,t,r)=>{"use strict";r.d(t,{F:()=>s,s:()=>a});var n=r(826),i=r(74905),o=r(8962);function a(e){const t=(0,o.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.R]).slice(0,32))}function s(e){const t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,o.ZN)(t.slice(0,r))}},92730:(e,t,r)=>{"use strict";r.d(t,{Ll:()=>p});var n=r(8962);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function a(e,t){let r=0;for(let n=0;n=r&&e<=r+i.h&&(e-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const s=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),c="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),l=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],u=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),d=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),f=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");let t=[];for(let r=0;r{if(c.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=a(e,l);if(t)return[e+t.s];let r=u[e];if(r)return r;let n=d[e];return n?[e+n[0]]:f[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,n.XL)((0,n.uu)(t),n.Uj.NFKC),t.forEach((e=>{if(a(e,h))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(a(e,s))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let i=(0,n.uu)(t);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");return i}},30770:(e,t,r)=>{"use strict";r.r(t),r.d(t,{UnicodeNormalizationForm:()=>o.Uj,Utf8ErrorFuncs:()=>o.te,Utf8ErrorReason:()=>o.Uw,_toEscapedUtf8String:()=>o.U$,formatBytes32String:()=>n.s,nameprep:()=>i.Ll,parseBytes32String:()=>n.F,toUtf8Bytes:()=>o.Y0,toUtf8CodePoints:()=>o.XL,toUtf8String:()=>o.ZN});var n=r(29313),i=r(92730),o=r(8962)},8962:(e,t,r)=>{"use strict";r.d(t,{Uj:()=>o,te:()=>c,Uw:()=>a,U$:()=>f,uu:()=>h,Y0:()=>u,XL:()=>m,ZN:()=>p});var n=r(74905);const i=new(r(83820).Logger)("strings/5.7.0");var o,a;function s(e,t,r,n,i){if(e===a.BAD_PREFIX||e===a.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6===2;n++)e++;return e}return e===a.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(o||(o={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(a||(a={}));const c=Object.freeze({error:function(e,t,r,n,o){return i.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:s,replace:function(e,t,r,n,i){return e===a.OVERLONG?(n.push(i),0):(n.push(65533),s(e,t,r))}});function l(e,t){null==t&&(t=c.error),e=(0,n.arrayify)(e);const r=[];let i=0;for(;i>7===0){r.push(n);continue}let o=null,s=null;if(192===(224&n))o=1,s=127;else if(224===(240&n))o=2,s=2047;else{if(240!==(248&n)){i+=t(128===(192&n)?a.UNEXPECTED_CONTINUE:a.BAD_PREFIX,i-1,e,r);continue}o=3,s=65535}if(i-1+o>=e.length){i+=t(a.OVERRUN,i-1,e,r);continue}let c=n&(1<<8-o-1)-1;for(let l=0;l1114111?i+=t(a.OUT_OF_RANGE,i-1-o,e,r,c):c>=55296&&c<=57343?i+=t(a.UTF16_SURROGATE,i-1-o,e,r,c):c<=s?i+=t(a.OVERLONG,i-1-o,e,r,c):r.push(c))}return r}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current;t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let r=[];for(let n=0;n>6|192),r.push(63&t|128);else if(55296==(64512&t)){n++;const i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&t)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(t>>12|224),r.push(t>>6&63|128),r.push(63&t|128)}return(0,n.arrayify)(r)}function d(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function f(e,t){return'"'+l(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?d(e):d(55296+((e-=65536)>>10&1023))+d(56320+(1023&e))})).join("")+'"'}function h(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function p(e,t){return h(l(e,t))}function m(e){return l(u(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current))}},62063:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TransactionTypes:()=>h,accessListify:()=>_,computeAddress:()=>y,parse:()=>C,recoverAddress:()=>b,serialize:()=>A});var n=r(87243),i=r(24326),o=r(74905),a=r(4767),s=r(15084),c=r(37025),l=r(69139),u=r(35046),d=r(83820);const f=new d.Logger("transactions/5.7.0");var h;function p(e){return"0x"===e?null:(0,n.getAddress)(e)}function m(e){return"0x"===e?a._Y:i.O$.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(h||(h={}));const g=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],v={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function y(e){const t=(0,u.computePublicKey)(e);return(0,n.getAddress)((0,o.hexDataSlice)((0,s.keccak256)((0,o.hexDataSlice)(t,1)),12))}function b(e,t){return y((0,u.recoverPublicKey)((0,o.arrayify)(e),t))}function w(e,t){const r=(0,o.stripZeros)(i.O$.from(e).toHexString());return r.length>32&&f.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function x(e,t){return{address:(0,n.getAddress)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,o.hexDataLength)(t)&&f.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function _(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&f.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),x(e[0],e[1])):x(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return x(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function E(e){return _(e).map((e=>[e.address,e.storageKeys]))}function k(e,t){if(null!=e.gasPrice){const t=i.O$.from(e.gasPrice),r=i.O$.from(e.maxFeePerGas||0);t.eq(r)||f.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",E(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x02",l.encode(r)])}function S(e,t){const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",E(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x01",l.encode(r)])}function A(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&f.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,c.checkProperties)(e,v);const r=[];g.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=(0,o.arrayify)((0,o.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&f.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.stripZeros)(n),n.length>t.maxLength&&f.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,o.hexlify)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!==typeof n&&f.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,o.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return l.encode(r);const i=(0,o.splitSignature)(t);let a=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),a+=2*n+8,i.v>28&&i.v!==a&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==a&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.hexlify)(a)),r.push((0,o.stripZeros)((0,o.arrayify)(i.r))),r.push((0,o.stripZeros)((0,o.arrayify)(i.s))),l.encode(r)}(e,t);switch(e.type){case 1:return S(e,t);case 2:return k(e,t)}return f.throwError(`unsupported transaction type: ${e.type}`,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function M(e,t,r){try{const r=m(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(n){f.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.hexZeroPad)(t[1],32),e.s=(0,o.hexZeroPad)(t[2],32);try{const t=(0,s.keccak256)(r(e));e.from=b(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(n){}}function C(e){const t=(0,o.arrayify)(e);if(t[0]>127)return function(e){const t=l.decode(e);9!==t.length&&6!==t.length&&f.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:m(t[0]).toNumber(),gasPrice:m(t[1]),gasLimit:m(t[2]),to:p(t[3]),value:m(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.O$.from(t[6]).toNumber()}catch(n){return r}if(r.r=(0,o.hexZeroPad)(t[7],32),r.s=(0,o.hexZeroPad)(t[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let i=r.v-27;const a=t.slice(0,6);0!==r.chainId&&(a.push((0,o.hexlify)(r.chainId)),a.push("0x"),a.push("0x"),i-=2*r.chainId+8);const c=(0,s.keccak256)(l.encode(a));try{r.from=b(c,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:i})}catch(n){}r.hash=(0,s.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&f.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.hexlify)(e));const r={type:1,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),gasPrice:m(t[2]),gasLimit:m(t[3]),to:p(t[4]),value:m(t[5]),data:t[6],accessList:_(t[7])};return 8===t.length||(r.hash=(0,s.keccak256)(e),M(r,t.slice(8),S)),r}(t);case 2:return function(e){const t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&f.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.hexlify)(e));const r=m(t[2]),n=m(t[3]),i={type:2,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:m(t[4]),to:p(t[5]),value:m(t[6]),data:t[7],accessList:_(t[8])};return 9===t.length||(i.hash=(0,s.keccak256)(e),M(i,t.slice(9),k)),i}(t)}return f.throwError(`unsupported transaction type: ${t[0]}`,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},44147:(e,t,r)=>{"use strict";r.r(t),r.d(t,{commify:()=>a,formatEther:()=>l,formatUnits:()=>s,parseEther:()=>u,parseUnits:()=>c});var n=r(50853);const i=new(r(83820).Logger)("units/5.7.0"),o=["wei","kwei","mwei","gwei","szabo","finney","ether"];function a(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&i.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let o="";for(2===t.length&&(o="."+(t[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);const a=[];for(;r.length;){if(r.length<=3){a.unshift(r);break}{const e=r.length-3;a.unshift(r.substring(e)),r=r.substring(0,e)}}return n+a.join(",")+o}function s(e,t){if("string"===typeof t){const e=o.indexOf(t);-1!==e&&(t=3*e)}return(0,n.S5)(e,null!=t?t:18)}function c(e,t){if("string"!==typeof e&&i.throwArgumentError("value must be a string","value",e),"string"===typeof t){const e=o.indexOf(t);-1!==e&&(t=3*e)}return(0,n.Ox)(e,null!=t?t:18)}function l(e){return s(e,18)}function u(e){return c(e,18)}},91765:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Wallet:()=>w,verifyMessage:()=>x,verifyTypedData:()=>_});var n=r(87243),i=r(43169),o=r(47818),a=r(74905),s=r(17026),c=r(71341),l=r(49465),u=r(15084),d=r(37025),f=r(43585),h=r(35046),p=r(33305),m=r(906),g=r(62063),v=r(83820);var y=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const b=new v.Logger("wallet/5.7.0");class w extends o.E{constructor(e,t){if(super(),null!=(r=e)&&(0,a.isHexString)(r.privateKey,32)&&null!=r.address){const t=new h.SigningKey(e.privateKey);if((0,d.defineReadOnly)(this,"_signingKey",(()=>t)),(0,d.defineReadOnly)(this,"address",(0,g.computeAddress)(this.publicKey)),this.address!==(0,n.getAddress)(e.address)&&b.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;(0,d.defineReadOnly)(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||l.defaultPath,locale:t.locale||"en"})));const r=this.mnemonic,n=l.HDNode.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,g.computeAddress)(n.privateKey)!==this.address&&b.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,d.defineReadOnly)(this,"_mnemonic",(()=>null))}else{if(h.SigningKey.isSigningKey(e))"secp256k1"!==e.curve&&b.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,d.defineReadOnly)(this,"_signingKey",(()=>e));else{"string"===typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new h.SigningKey(e);(0,d.defineReadOnly)(this,"_signingKey",(()=>t))}(0,d.defineReadOnly)(this,"_mnemonic",(()=>null)),(0,d.defineReadOnly)(this,"address",(0,g.computeAddress)(this.publicKey))}var r;t&&!i.zt.isProvider(t)&&b.throwArgumentError("invalid provider","provider",t),(0,d.defineReadOnly)(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new w(this,e)}signTransaction(e){return(0,d.resolveProperties)(e).then((t=>{null!=t.from&&((0,n.getAddress)(t.from)!==this.address&&b.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest((0,u.keccak256)((0,g.serialize)(t)));return(0,g.serialize)(t,r)}))}signMessage(e){return y(this,void 0,void 0,(function*(){return(0,a.joinSignature)(this._signingKey().signDigest((0,s.r)(e)))}))}_signTypedData(e,t,r){return y(this,void 0,void 0,(function*(){const n=yield c.E.resolveNames(e,t,r,(e=>(null==this.provider&&b.throwError("cannot resolve ENS names without a provider",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return(0,a.joinSignature)(this._signingKey().signDigest(c.E.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!==typeof t||r||(r=t,t={}),r&&"function"!==typeof r)throw new Error("invalid callback");return t||(t={}),(0,p.HI)(this,e,t,r)}static createRandom(e){let t=(0,f.O)(16);e||(e={}),e.extraEntropy&&(t=(0,a.arrayify)((0,a.hexDataSlice)((0,u.keccak256)((0,a.concat)([t,e.extraEntropy])),0,16)));const r=(0,l.entropyToMnemonic)(t,e.locale);return w.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return(0,m.decryptJsonWallet)(e,t,r).then((e=>new w(e)))}static fromEncryptedJsonSync(e,t){return new w((0,m.decryptJsonWalletSync)(e,t))}static fromMnemonic(e,t,r){return t||(t=l.defaultPath),new w(l.HDNode.fromMnemonic(e,null,r).derivePath(t))}}function x(e,t){return(0,g.recoverAddress)((0,s.r)(e),t)}function _(e,t,r,n){return(0,g.recoverAddress)(c.E.hash(e,t,r),n)}},79545:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_fetchData:()=>p,fetchJson:()=>m,poll:()=>g});var n=r(29204),i=r(74905),o=r(37025),a=r(8962),s=r(83820);var c=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};function l(e,t){return c(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach(((e,t)=>{a[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{a[e.toLowerCase()]=n.headers.get(e)})),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:(0,i.arrayify)(new Uint8Array(o))}}))}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const d=new s.Logger("web/5.7.1");function f(e){return new Promise((t=>{setTimeout(t,e)}))}function h(e,t){if(null==e)return null;if("string"===typeof e)return e;if((0,i.isBytesLike)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,a.ZN)(e)}catch(r){}return(0,i.hexlify)(e)}return e}function p(e,t,r){const i="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;d.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);const c="object"===typeof e?e.throttleCallback:null,p="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;d.assertArgument(p>0&&p%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const m="object"===typeof e&&!!e.errorPassThrough,g={};let v=null;const y={method:"GET"};let b=!1,w=12e4;if("string"===typeof e)v=e;else if("object"===typeof e){if(null!=e&&null!=e.url||d.throwArgumentError("missing URL","connection.url",e),v=e.url,"number"===typeof e.timeout&&e.timeout>0&&(w=e.timeout),e.headers)for(const t in e.headers)g[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(b=!0);if(y.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==v.substring(0,6)&&!0!==e.allowInsecureAuthentication&&d.throwError("basic authentication requires a secure https url",s.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:v,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;g.authorization={key:"Authorization",value:"Basic "+(0,n.c)((0,a.Y0)(t))}}null!=e.skipFetchSetup&&(y.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(y.fetchOptions=(0,o.shallowCopy)(e.fetchOptions))}const x=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=v?v.match(x):null;if(_)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?(0,n.J)(_[3]):(E=_[3],(0,a.Y0)(E.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(M){d.throwError("processing response error",s.Logger.errors.SERVER_ERROR,{body:h(_[1],_[2]),error:M,requestBody:null,requestMethod:"GET",url:v})}var E;t&&(y.method="POST",y.body=t,null==g["content-type"]&&(g["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==g["content-length"]&&(g["content-length"]={key:"Content-Length",value:String(t.length)}));const k={};Object.keys(g).forEach((e=>{const t=g[e];k[t.key]=t.value})),y.headers=k;const S=function(){let e=null;return{promise:new Promise((function(t,r){w&&(e=setTimeout((()=>{null!=e&&(e=null,r(d.makeError("timeout",s.Logger.errors.TIMEOUT,{requestBody:h(y.body,k["content-type"]),requestMethod:y.method,timeout:w,url:v})))}),w))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),A=function(){return u(this,void 0,void 0,(function*(){for(let e=0;e=300)&&(S.cancel(),d.throwError("bad response",s.Logger.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:h(n,t.headers?t.headers["content-type"]:null),requestBody:h(y.body,k["content-type"]),requestMethod:y.method,url:v})),r)try{const e=yield r(n,t);return S.cancel(),e}catch(M){if(M.throttleRetry&&e"content-type"===e.toLowerCase())).length||(r.headers=(0,o.shallowCopy)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return p(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,a.ZN)(e))}catch(i){d.throwError("invalid JSON",s.Logger.errors.SERVER_ERROR,{body:e,error:i})}return r&&(n=r(n,t)),n}))}function g(e,t){return t||(t={}),null==(t=(0,o.shallowCopy)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const a=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{a()&&n(new Error("timeout"))}),t.timeout));const s=t.retryLimit;let c=0;!function i(){return e().then((function(e){if(void 0!==e)a()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(c++,c>s)return void(a()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,c)));et.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){a()&&n(e)}))}()}))}},91778:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(86507),i=r(37025),o=r(83820);const a=new o.Logger("wordlists/5.7.0");class s{constructor(e){a.checkAbstract(new.target,s),(0,i.defineReadOnly)(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,n.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}},80095:(e,t,r)=>{"use strict";r.d(t,{E:()=>l});var n=r(91778);const i="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let o=null;function a(e){if(null==o&&(o=i.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==n.D.check(e)))throw o=null,new Error("BIP39 Wordlist for en (English) FAILED")}class s extends n.D{constructor(){super("en")}getWord(e){return a(this),o[e]}getWordIndex(e){return a(this),o.indexOf(e)}}const c=new s;n.D.register(c);const l={en:c}},28942:(e,t,r)=>{"use strict";r.d(t,{Z:()=>I});var n=r(17692),i=r(29382),o=r(83358),a=r(9339),s=r(38482),c=r(27898),l=r(11964),u=r(33437),d=r(6922),f=r(19961),h=r(71972),p=r(14771),m=r(74289),g=r(97011);function v(e,t){var r=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){r[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)})),r}function y(e,t,r){return null!=r[t]?r[t]:e.props[t]}function b(e,t,r){var n=v(e.children),i=function(e,t){function r(r){return r in t?t[r]:e[r]}e=e||{},t=t||{};var n,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var c in t){if(i[c])for(n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.pulsate,i=void 0!==n&&n,o=t.center,s=void 0===o?a||t.pulsate:o,c=t.fakeElement,l=void 0!==c&&c;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var u,d,f,h=l?null:w.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(p.width/2),d=Math.round(p.height/2);else{var m=e.touches?e.touches[0]:e,g=m.clientX,_=m.clientY;u=Math.round(g-p.left),d=Math.round(_-p.top)}if(s)(f=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(f+=1);else{var E=2*Math.max(Math.abs((h?h.clientWidth:0)-u),u)+2,k=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(E,2)+Math.pow(k,2))}e.touches?null===b.current&&(b.current=function(){x({pulsate:i,rippleX:u,rippleY:d,rippleSize:f,cb:r})},y.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),S)):x({pulsate:i,rippleX:u,rippleY:d,rippleSize:f,cb:r})}}),[a,x]),A=o.useCallback((function(){E({},{pulsate:!0})}),[E]),M=o.useCallback((function(e,t){if(clearTimeout(y.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(y.current=setTimeout((function(){M(e,t)})));b.current=null,p((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return o.useImperativeHandle(t,(function(){return{pulsate:A,start:E,stop:M}}),[A,E,M]),o.createElement("span",(0,n.Z)({className:(0,s.Z)(c.root,l),ref:w},u),o.createElement(_,{component:null,exit:!0},h))}));const M=(0,u.Z)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(A));var C=o.forwardRef((function(e,t){var r=e.action,u=e.buttonRef,f=e.centerRipple,h=void 0!==f&&f,p=e.children,m=e.classes,g=e.className,v=e.component,y=void 0===v?"button":v,b=e.disabled,w=void 0!==b&&b,x=e.disableRipple,_=void 0!==x&&x,E=e.disableTouchRipple,k=void 0!==E&&E,S=e.focusRipple,A=void 0!==S&&S,C=e.focusVisibleClassName,I=e.onBlur,T=e.onClick,P=e.onFocus,O=e.onFocusVisible,R=e.onKeyDown,N=e.onKeyUp,B=e.onMouseDown,L=e.onMouseLeave,j=e.onMouseUp,D=e.onTouchEnd,F=e.onTouchMove,U=e.onTouchStart,z=e.onDragLeave,Z=e.tabIndex,q=void 0===Z?0:Z,H=e.TouchRippleProps,V=e.type,W=void 0===V?"button":V,$=(0,i.Z)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),K=o.useRef(null);var G=o.useRef(null),Y=o.useState(!1),J=Y[0],X=Y[1];w&&J&&X(!1);var Q=(0,d.Z)(),ee=Q.isFocusVisible,te=Q.onBlurVisible,re=Q.ref;function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k;return(0,l.Z)((function(n){return t&&t(n),!r&&G.current&&G.current[e](n),!0}))}o.useImperativeHandle(r,(function(){return{focusVisible:function(){X(!0),K.current.focus()}}}),[]),o.useEffect((function(){J&&A&&!_&&G.current.pulsate()}),[_,A,J]);var ie=ne("start",B),oe=ne("stop",z),ae=ne("stop",j),se=ne("stop",(function(e){J&&e.preventDefault(),L&&L(e)})),ce=ne("start",U),le=ne("stop",D),ue=ne("stop",F),de=ne("stop",(function(e){J&&(te(e),X(!1)),I&&I(e)}),!1),fe=(0,l.Z)((function(e){K.current||(K.current=e.currentTarget),ee(e)&&(X(!0),O&&O(e)),P&&P(e)})),he=function(){var e=a.findDOMNode(K.current);return y&&"button"!==y&&!("A"===e.tagName&&e.href)},pe=o.useRef(!1),me=(0,l.Z)((function(e){A&&!pe.current&&J&&G.current&&" "===e.key&&(pe.current=!0,e.persist(),G.current.stop(e,(function(){G.current.start(e)}))),e.target===e.currentTarget&&he()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&!w&&(e.preventDefault(),T&&T(e))})),ge=(0,l.Z)((function(e){A&&" "===e.key&&G.current&&J&&!e.defaultPrevented&&(pe.current=!1,e.persist(),G.current.stop(e,(function(){G.current.pulsate(e)}))),N&&N(e),T&&e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&T(e)})),ve=y;"button"===ve&&$.href&&(ve="a");var ye={};"button"===ve?(ye.type=W,ye.disabled=w):("a"===ve&&$.href||(ye.role="button"),ye["aria-disabled"]=w);var be=(0,c.Z)(u,t),we=(0,c.Z)(re,K),xe=(0,c.Z)(be,we),_e=o.useState(!1),Ee=_e[0],ke=_e[1];o.useEffect((function(){ke(!0)}),[]);var Se=Ee&&!_&&!w;return o.createElement(ve,(0,n.Z)({className:(0,s.Z)(m.root,g,J&&[m.focusVisible,C],w&&m.disabled),onBlur:de,onClick:T,onFocus:fe,onKeyDown:me,onKeyUp:ge,onMouseDown:ie,onMouseLeave:se,onMouseUp:ae,onDragLeave:oe,onTouchEnd:le,onTouchMove:ue,onTouchStart:ce,ref:xe,tabIndex:w?-1:q},ye,$),p,Se?o.createElement(M,(0,n.Z)({ref:G,center:h},H)):null)}));const I=(0,u.Z)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(C)},73506:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(83358),i=r(9339),o=r(2320),a=r(27898),s=r(11964);function c(e){return e.substring(2).toLowerCase()}const l=function(e){var t=e.children,r=e.disableReactTree,l=void 0!==r&&r,u=e.mouseEvent,d=void 0===u?"onClick":u,f=e.onClickAway,h=e.touchEvent,p=void 0===h?"onTouchEnd":h,m=n.useRef(!1),g=n.useRef(null),v=n.useRef(!1),y=n.useRef(!1);n.useEffect((function(){return setTimeout((function(){v.current=!0}),0),function(){v.current=!1}}),[]);var b=n.useCallback((function(e){g.current=i.findDOMNode(e)}),[]),w=(0,a.Z)(t.ref,b),x=(0,s.Z)((function(e){var t=y.current;if(y.current=!1,v.current&&g.current&&!function(e){return document.documentElement.clientWidth-1;else r=!(0,o.Z)(g.current).documentElement.contains(e.target)||g.current.contains(e.target);r||!l&&t||f(e)}})),_=function(e){return function(r){y.current=!0;var n=t.props[e];n&&n(r)}},E={ref:w};return!1!==p&&(E[p]=_(p)),n.useEffect((function(){if(!1!==p){var e=c(p),t=(0,o.Z)(g.current),r=function(){m.current=!0};return t.addEventListener(e,x),t.addEventListener("touchmove",r),function(){t.removeEventListener(e,x),t.removeEventListener("touchmove",r)}}}),[x,p]),!1!==d&&(E[d]=_(d)),n.useEffect((function(){if(!1!==d){var e=c(d),t=(0,o.Z)(g.current);return t.addEventListener(e,x),function(){t.removeEventListener(e,x)}}}),[x,d]),n.createElement(n.Fragment,null,n.cloneElement(t,E))}},18345:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(17692),i=r(23680),o=r(29382),a=r(83358),s=r(38482),c=r(55660),l=r(33437),u=r(90873),d=r(19219),f=r(6785),h=r(27898),p=a.forwardRef((function(e,t){var r=e.children,l=e.classes,p=e.className,m=e.collapsedHeight,g=e.collapsedSize,v=void 0===g?"0px":g,y=e.component,b=void 0===y?"div":y,w=e.disableStrictModeCompat,x=void 0!==w&&w,_=e.in,E=e.onEnter,k=e.onEntered,S=e.onEntering,A=e.onExit,M=e.onExited,C=e.onExiting,I=e.style,T=e.timeout,P=void 0===T?u.x9.standard:T,O=e.TransitionComponent,R=void 0===O?c.ZP:O,N=(0,o.Z)(e,["children","classes","className","collapsedHeight","collapsedSize","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),B=(0,f.Z)(),L=a.useRef(),j=a.useRef(null),D=a.useRef(),F="number"===typeof(m||v)?"".concat(m||v,"px"):m||v;a.useEffect((function(){return function(){clearTimeout(L.current)}}),[]);var U=B.unstable_strictMode&&!x,z=a.useRef(null),Z=(0,h.Z)(t,U?z:void 0),q=function(e){return function(t,r){if(e){var n=U?[z.current,t]:[t,r],o=(0,i.Z)(n,2),a=o[0],s=o[1];void 0===s?e(a):e(a,s)}}},H=q((function(e,t){e.style.height=F,E&&E(e,t)})),V=q((function(e,t){var r=j.current?j.current.clientHeight:0,n=(0,d.C)({style:I,timeout:P},{mode:"enter"}).duration;if("auto"===P){var i=B.transitions.getAutoHeightDuration(r);e.style.transitionDuration="".concat(i,"ms"),D.current=i}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style.height="".concat(r,"px"),S&&S(e,t)})),W=q((function(e,t){e.style.height="auto",k&&k(e,t)})),$=q((function(e){var t=j.current?j.current.clientHeight:0;e.style.height="".concat(t,"px"),A&&A(e)})),K=q(M),G=q((function(e){var t=j.current?j.current.clientHeight:0,r=(0,d.C)({style:I,timeout:P},{mode:"exit"}).duration;if("auto"===P){var n=B.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(n,"ms"),D.current=n}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style.height=F,C&&C(e)}));return a.createElement(R,(0,n.Z)({in:_,onEnter:H,onEntered:W,onEntering:V,onExit:$,onExited:K,onExiting:G,addEndListener:function(e,t){var r=U?e:t;"auto"===P&&(L.current=setTimeout(r,D.current||0))},nodeRef:U?z:void 0,timeout:"auto"===P?null:P},N),(function(e,t){return a.createElement(b,(0,n.Z)({className:(0,s.Z)(l.root,l.container,p,{entered:l.entered,exited:!_&&"0px"===F&&l.hidden}[e]),style:(0,n.Z)({minHeight:F},I),ref:Z},t),a.createElement("div",{className:l.wrapper,ref:j},a.createElement("div",{className:l.wrapperInner},r)))}))}));p.muiSupportAuto=!0;const m=(0,l.Z)((function(e){return{root:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}}),{name:"MuiCollapse"})(p)},31044:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.Z});var n=r(18345)},28710:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>c});var n=r(17692),i=r(83358),o=r(33437),a={WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box"},s=function(e){return(0,n.Z)({color:e.palette.text.primary},e.typography.body2,{backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white}})};const c=(0,o.Z)((function(e){return{"@global":{html:a,"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,n.Z)({margin:0},s(e),{"&::backdrop":{backgroundColor:e.palette.background.default}})}}}),{name:"MuiCssBaseline"})((function(e){var t=e.children,r=void 0===t?null:t;return e.classes,i.createElement(i.Fragment,null,r)}))},45573:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(17692),i=r(29382),o=r(83358),a=r(38482),s=r(33437),c=r(19012),l=r(28942),u=r(28570),d=o.forwardRef((function(e,t){var r=e.edge,s=void 0!==r&&r,c=e.children,d=e.classes,f=e.className,h=e.color,p=void 0===h?"default":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,y=void 0!==v&&v,b=e.size,w=void 0===b?"medium":b,x=(0,i.Z)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return o.createElement(l.Z,(0,n.Z)({className:(0,a.Z)(d.root,f,"default"!==p&&d["color".concat((0,u.Z)(p))],g&&d.disabled,"small"===w&&d["size".concat((0,u.Z)(w))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!y,disabled:g,ref:t},x),o.createElement("span",{className:d.label},c))}));const f=(0,s.Z)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,c.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,c.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,c.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},57643:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.Z});var n=r(45573)},98701:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(17692),i=r(29382),o=r(83358),a=r(9339),s=r(88448),c=r(55660),l=r(27898),u=r(6785),d=r(90873),f=r(19219);function h(e,t){var r=function(e,t){var r,n=t.getBoundingClientRect();if(t.fakeTransform)r=t.fakeTransform;else{var i=window.getComputedStyle(t);r=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var o=0,a=0;if(r&&"none"!==r&&"string"===typeof r){var s=r.split("(")[1].split(")")[0].split(",");o=parseInt(s[4],10),a=parseInt(s[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(o-n.left,"px)"):"right"===e?"translateX(-".concat(n.left+n.width-o,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-n.top,"px)"):"translateY(-".concat(n.top+n.height-a,"px)")}(e,t);r&&(t.style.webkitTransform=r,t.style.transform=r)}var p={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen};const m=o.forwardRef((function(e,t){var r=e.children,d=e.direction,m=void 0===d?"down":d,g=e.in,v=e.onEnter,y=e.onEntered,b=e.onEntering,w=e.onExit,x=e.onExited,_=e.onExiting,E=e.style,k=e.timeout,S=void 0===k?p:k,A=e.TransitionComponent,M=void 0===A?c.ZP:A,C=(0,i.Z)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),I=(0,u.Z)(),T=o.useRef(null),P=o.useCallback((function(e){T.current=a.findDOMNode(e)}),[]),O=(0,l.Z)(r.ref,P),R=(0,l.Z)(O,t),N=function(e){return function(t){e&&(void 0===t?e(T.current):e(T.current,t))}},B=N((function(e,t){h(m,e),(0,f.n)(e),v&&v(e,t)})),L=N((function(e,t){var r=(0,f.C)({timeout:S,style:E},{mode:"enter"});e.style.webkitTransition=I.transitions.create("-webkit-transform",(0,n.Z)({},r,{easing:I.transitions.easing.easeOut})),e.style.transition=I.transitions.create("transform",(0,n.Z)({},r,{easing:I.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",b&&b(e,t)})),j=N(y),D=N(_),F=N((function(e){var t=(0,f.C)({timeout:S,style:E},{mode:"exit"});e.style.webkitTransition=I.transitions.create("-webkit-transform",(0,n.Z)({},t,{easing:I.transitions.easing.sharp})),e.style.transition=I.transitions.create("transform",(0,n.Z)({},t,{easing:I.transitions.easing.sharp})),h(m,e),w&&w(e)})),U=N((function(e){e.style.webkitTransition="",e.style.transition="",x&&x(e)})),z=o.useCallback((function(){T.current&&h(m,T.current)}),[m]);return o.useEffect((function(){if(!g&&"down"!==m&&"right"!==m){var e=(0,s.Z)((function(){T.current&&h(m,T.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[m,g]),o.useEffect((function(){g||z()}),[g,z]),o.createElement(M,(0,n.Z)({nodeRef:T,onEnter:B,onEntered:j,onEntering:L,onExit:F,onExited:U,onExiting:D,appear:!0,in:g,timeout:S},C),(function(e,t){return o.cloneElement(r,(0,n.Z)({ref:R,style:(0,n.Z)({visibility:"exited"!==e||g?void 0:"hidden"},E,r.props.style)},t))}))}))},97012:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(17692),i=r(29382),o=r(83358),a=r(38482),s=r(33437),c=r(28570),l=o.forwardRef((function(e,t){var r=e.children,s=e.classes,l=e.className,u=e.color,d=void 0===u?"inherit":u,f=e.component,h=void 0===f?"svg":f,p=e.fontSize,m=void 0===p?"medium":p,g=e.htmlColor,v=e.titleAccess,y=e.viewBox,b=void 0===y?"0 0 24 24":y,w=(0,i.Z)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.createElement(h,(0,n.Z)({className:(0,a.Z)(s.root,l,"inherit"!==d&&s["color".concat((0,c.Z)(d))],"default"!==m&&"medium"!==m&&s["fontSize".concat((0,c.Z)(m))]),focusable:"false",viewBox:b,color:g,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},w),r,v?o.createElement("title",null,v):null)}));l.muiName="SvgIcon";const u=(0,s.Z)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l)},27815:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(17692),i=r(29382),o=r(83358),a=r(38482),s=r(33437),c=r(28570),l={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=o.forwardRef((function(e,t){var r=e.align,s=void 0===r?"inherit":r,u=e.classes,d=e.className,f=e.color,h=void 0===f?"initial":f,p=e.component,m=e.display,g=void 0===m?"initial":m,v=e.gutterBottom,y=void 0!==v&&v,b=e.noWrap,w=void 0!==b&&b,x=e.paragraph,_=void 0!==x&&x,E=e.variant,k=void 0===E?"body1":E,S=e.variantMapping,A=void 0===S?l:S,M=(0,i.Z)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),C=p||(_?"p":A[k]||l[k])||"span";return o.createElement(C,(0,n.Z)({className:(0,a.Z)(u.root,d,"inherit"!==k&&u[k],"initial"!==h&&u["color".concat((0,c.Z)(h))],w&&u.noWrap,y&&u.gutterBottom,_&&u.paragraph,"inherit"!==s&&u["align".concat((0,c.Z)(s))],"initial"!==g&&u["display".concat((0,c.Z)(g))]),ref:t},M))}));const d=(0,s.Z)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},58704:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},65719:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={black:"#000",white:"#fff"}},73815:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},32854:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"}},39410:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"}},77286:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},13284:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"}},84439:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},36664:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Accordion:()=>pe,AccordionActions:()=>ge,AccordionDetails:()=>ye,AccordionSummary:()=>_e,AppBar:()=>Se,Avatar:()=>Ie,Backdrop:()=>De,Badge:()=>Ue,BottomNavigation:()=>Ze,BottomNavigationAction:()=>He,Box:()=>wt,Breadcrumbs:()=>St,Button:()=>Mt,ButtonBase:()=>be.Z,ButtonGroup:()=>It,Card:()=>Pt,CardActionArea:()=>Rt,CardActions:()=>Bt,CardContent:()=>jt,CardHeader:()=>Ft,CardMedia:()=>Zt,Checkbox:()=>rr,Chip:()=>ar,CircularProgress:()=>lr,ClickAwayListener:()=>ur.Z,Collapse:()=>ce.Z,Container:()=>fr,CssBaseline:()=>hr.ZP,Dialog:()=>Dr,DialogActions:()=>Ur,DialogContent:()=>Zr,DialogContentText:()=>Hr,DialogTitle:()=>Wr,Divider:()=>Kr,Drawer:()=>tn,ExpansionPanel:()=>on,ExpansionPanelActions:()=>sn,ExpansionPanelDetails:()=>ln,ExpansionPanelSummary:()=>dn,Fab:()=>hn,Fade:()=>Le,FilledInput:()=>Cn,FormControl:()=>Pn,FormControlLabel:()=>Rn,FormGroup:()=>Bn,FormHelperText:()=>jn,FormLabel:()=>Fn,Grid:()=>Vn,GridList:()=>$n,GridListTile:()=>Yn,GridListTileBar:()=>Xn,Grow:()=>ri,Hidden:()=>pi,Icon:()=>gi,IconButton:()=>we.Z,ImageList:()=>yi,ImageListItem:()=>xi,ImageListItemBar:()=>Ei,Input:()=>Si,InputAdornment:()=>Mi,InputBase:()=>An,InputLabel:()=>Ii,LinearProgress:()=>Pi,Link:()=>Ni,List:()=>ji,ListItem:()=>Ui,ListItemAvatar:()=>Zi,ListItemIcon:()=>Hi,ListItemSecondaryAction:()=>Wi,ListItemText:()=>Ki,ListSubheader:()=>Yi,Menu:()=>ho,MenuItem:()=>mo,MenuList:()=>co,MobileStepper:()=>vo,Modal:()=>Br,ModalManager:()=>Tr,MuiThemeProvider:()=>ee.Z,NativeSelect:()=>Eo,NoSsr:()=>So,OutlinedInput:()=>Io,Paper:()=>ue,Popover:()=>ro,Popper:()=>Da,Portal:()=>br,Radio:()=>$a,RadioGroup:()=>Ga,RootRef:()=>ts,Select:()=>us,ServerStyleSheets:()=>Q,Slide:()=>Gr.Z,Slider:()=>Es,Snackbar:()=>Ms,SnackbarContent:()=>Ss,Step:()=>Is,StepButton:()=>Fs,StepConnector:()=>zs,StepContent:()=>qs,StepIcon:()=>Bs,StepLabel:()=>js,Stepper:()=>Ws,StylesProvider:()=>X.ZP,SvgIcon:()=>Os.Z,SwipeableDrawer:()=>ic,Switch:()=>ac,Tab:()=>cc,TabScrollButton:()=>ol,Table:()=>fc,TableBody:()=>vc,TableCell:()=>bc,TableContainer:()=>xc,TableFooter:()=>Sc,TableHead:()=>Ic,TablePagination:()=>Zc,TableRow:()=>Hc,TableSortLabel:()=>$c,Tabs:()=>sl,TextField:()=>ul,TextareaAutosize:()=>xn,ThemeProvider:()=>ee.Z,Toolbar:()=>Pc,Tooltip:()=>ml,Typography:()=>xt.Z,Unstable_TrapFocus:()=>Pr,Zoom:()=>El,alpha:()=>k.Fq,capitalize:()=>te.capitalize,colors:()=>n,createChainedFunction:()=>te.createChainedFunction,createGenerateClassName:()=>$.Z,createMuiTheme:()=>S.A,createStyles:()=>C.Z,createSvgIcon:()=>te.createSvgIcon,createTheme:()=>S.Z,darken:()=>k._j,debounce:()=>te.debounce,decomposeColor:()=>k.tB,deprecatedPropType:()=>te.deprecatedPropType,duration:()=>z.x9,easing:()=>z.Ui,emphasize:()=>k._4,fade:()=>k.U1,getContrastRatio:()=>k.mi,getLuminance:()=>k.H3,hexToRgb:()=>k.oo,hslToRgb:()=>k.ve,isMuiElement:()=>te.isMuiElement,isWidthDown:()=>ci,isWidthUp:()=>si,jssPreset:()=>K.Z,lighten:()=>k.$n,makeStyles:()=>I.Z,ownerDocument:()=>te.ownerDocument,ownerWindow:()=>te.ownerWindow,recomposeColor:()=>k.wy,requirePropFactory:()=>te.requirePropFactory,responsiveFontSizes:()=>T.Z,rgbToHex:()=>k.vq,setRef:()=>te.setRef,styleFunction:()=>bt,styled:()=>U,unstable_createMuiStrictModeTheme:()=>M,unstable_useId:()=>te.unstable_useId,unsupportedProp:()=>te.unsupportedProp,useControlled:()=>te.useControlled,useEventCallback:()=>te.useEventCallback,useForkRef:()=>te.useForkRef,useFormControl:()=>Wt,useIsFocusVisible:()=>te.useIsFocusVisible,useMediaQuery:()=>ai,useRadioGroup:()=>qa,useScrollTrigger:()=>yl,useTheme:()=>Z.Z,withMobileDialog:()=>bl,withStyles:()=>q.Z,withTheme:()=>W,withWidth:()=>ui});var n={};r.r(n),r.d(n,{amber:()=>y,blue:()=>u.Z,blueGrey:()=>E,brown:()=>x,common:()=>i.Z,cyan:()=>f,deepOrange:()=>w,deepPurple:()=>c,green:()=>p.Z,grey:()=>_.Z,indigo:()=>l.Z,lightBlue:()=>d,lightGreen:()=>m,lime:()=>g,orange:()=>b.Z,pink:()=>a.Z,purple:()=>s,red:()=>o.Z,teal:()=>h,yellow:()=>v});var i=r(65719),o=r(84439),a=r(13284);const s={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};const c={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"};var l=r(39410),u=r(58704);const d={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};const f={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"};const h={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};var p=r(73815);const m={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"};const g={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"};const v={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"};const y={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"};var b=r(77286);const w={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"};const x={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"};var _=r(32854);const E={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"};var k=r(19012),S=r(77166),A=r(49998);function M(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:{},n=r.name,i=(0,O.Z)(r,["name"]);var o,a=n,s="function"===typeof t?function(e){return{root:function(r){return t((0,P.Z)({theme:e},r))}}}:{root:t},c=(0,j.Z)(s,(0,P.Z)({Component:e,name:n||e.displayName,classNamePrefix:a},i));t.filterProps&&(o=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var l=R.forwardRef((function(t,r){var n=t.children,i=t.className,a=t.clone,s=t.component,l=(0,O.Z)(t,["children","className","clone","component"]),u=c(t),d=(0,N.Z)(u.root,i),f=l;if(o&&(f=function(e,t){var r={};return Object.keys(e).forEach((function(n){-1===t.indexOf(n)&&(r[n]=e[n])})),r}(f,o)),a)return R.cloneElement(n,(0,P.Z)({className:(0,N.Z)(n.props.className,d)},f));if("function"===typeof n)return n((0,P.Z)({className:d},f));var h=s||e;return R.createElement(h,(0,P.Z)({ref:r,className:d},f),n)}));return L()(l,e),l}}var F=r(26727);const U=function(e){var t=D(e);return function(e,r){return t(e,(0,P.Z)({defaultTheme:F.Z},r))}};var z=r(90873),Z=r(6785),q=r(33437),H=r(56444);function V(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).defaultTheme;return function(t){var r=R.forwardRef((function(r,n){var i=r.innerRef,o=(0,O.Z)(r,["innerRef"]),a=(0,H.Z)()||e;return R.createElement(t,(0,P.Z)({theme:a,ref:i||n},o))}));return L()(r,t),r}}V();const W=V({defaultTheme:F.Z});var $=r(61145),K=r(28888);function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Y=r(59900),J=r(72573),X=r(37814),Q=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};G(this,e),this.options=t}return(0,Y.Z)(e,[{key:"collect",value:function(e){var t=new Map;this.sheetsRegistry=new J.xE;var r=(0,$.Z)();return R.createElement(X.ZP,(0,P.Z)({sheetsManager:t,serverGenerateClassName:r,sheetsRegistry:this.sheetsRegistry},this.options),e)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(e){return R.createElement("style",(0,P.Z)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},e))}}]),e}(),ee=r(58266),te=r(63060),re=r(6220),ne=r(44125),ie=r(34783),oe=r(16089);function ae(e){return(0,re.Z)(e)||(0,ne.Z)(e)||(0,ie.Z)(e)||(0,oe.Z)()}var se=r(23680),ce=(r(73219),r(18345)),le=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?"div":i,a=e.square,s=void 0!==a&&a,c=e.elevation,l=void 0===c?1:c,u=e.variant,d=void 0===u?"elevation":u,f=(0,O.Z)(e,["classes","className","component","square","elevation","variant"]);return R.createElement(o,(0,P.Z)({className:(0,N.Z)(r.root,n,"outlined"===d?r.outlined:r["elevation".concat(l)],!s&&r.rounded),ref:t},f))}));const ue=(0,q.Z)((function(e){var t={};return e.shadows.forEach((function(e,r){t["elevation".concat(r)]={boxShadow:e}})),(0,P.Z)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(le);const de=R.createContext({});var fe=r(70475),he=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.defaultExpanded,a=void 0!==o&&o,s=e.disabled,c=void 0!==s&&s,l=e.expanded,u=e.onChange,d=e.square,f=void 0!==d&&d,h=e.TransitionComponent,p=void 0===h?ce.Z:h,m=e.TransitionProps,g=(0,O.Z)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),v=(0,fe.Z)({controlled:l,default:a,name:"Accordion",state:"expanded"}),y=(0,se.Z)(v,2),b=y[0],w=y[1],x=R.useCallback((function(e){w(!b),u&&u(e,!b)}),[b,u,w]),_=ae(R.Children.toArray(r)),E=_[0],k=_.slice(1),S=R.useMemo((function(){return{expanded:b,disabled:c,toggle:x}}),[b,c,x]);return R.createElement(ue,(0,P.Z)({className:(0,N.Z)(n.root,i,b&&n.expanded,c&&n.disabled,!f&&n.rounded),ref:t,square:f},g),R.createElement(de.Provider,{value:S},E),R.createElement(p,(0,P.Z)({in:b,timeout:"auto"},m),R.createElement("div",{"aria-labelledby":E.props.id,id:E.props["aria-controls"],role:"region"},k)))}));const pe=(0,q.Z)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiAccordion"})(he);var me=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.disableSpacing,o=void 0!==i&&i,a=(0,O.Z)(e,["classes","className","disableSpacing"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n,!o&&r.spacing),ref:t},a))}));const ge=(0,q.Z)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiAccordionActions"})(me);var ve=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=(0,O.Z)(e,["classes","className"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n),ref:t},i))}));const ye=(0,q.Z)((function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}}),{name:"MuiAccordionDetails"})(ve);var be=r(28942),we=r(45573),xe=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.expandIcon,a=e.focusVisibleClassName,s=e.IconButtonProps,c=void 0===s?{}:s,l=e.onClick,u=(0,O.Z)(e,["children","classes","className","expandIcon","focusVisibleClassName","IconButtonProps","onClick"]),d=R.useContext(de),f=d.disabled,h=void 0!==f&&f,p=d.expanded,m=d.toggle;return R.createElement(be.Z,(0,P.Z)({focusRipple:!1,disableRipple:!0,disabled:h,component:"div","aria-expanded":p,className:(0,N.Z)(n.root,i,h&&n.disabled,p&&n.expanded),focusVisibleClassName:(0,N.Z)(n.focusVisible,n.focused,a),onClick:function(e){m&&m(e),l&&l(e)},ref:t},u),R.createElement("div",{className:(0,N.Z)(n.content,p&&n.expanded)},r),o&&R.createElement(we.Z,(0,P.Z)({className:(0,N.Z)(n.expandIcon,p&&n.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},c),o))}));const _e=(0,q.Z)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused, &$focusVisible":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},focusVisible:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiAccordionSummary"})(xe);var Ee=r(28570),ke=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.color,o=void 0===i?"primary":i,a=e.position,s=void 0===a?"fixed":a,c=(0,O.Z)(e,["classes","className","color","position"]);return R.createElement(ue,(0,P.Z)({square:!0,component:"header",elevation:4,className:(0,N.Z)(r.root,r["position".concat((0,Ee.Z)(s))],r["color".concat((0,Ee.Z)(o))],n,"fixed"===s&&"mui-fixed"),ref:t},c))}));const Se=(0,q.Z)((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(ke);var Ae=r(65038);const Me=(0,Ae.Z)(R.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");var Ce=R.forwardRef((function(e,t){var r=e.alt,n=e.children,i=e.classes,o=e.className,a=e.component,s=void 0===a?"div":a,c=e.imgProps,l=e.sizes,u=e.src,d=e.srcSet,f=e.variant,h=void 0===f?"circular":f,p=(0,O.Z)(e,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),m=null,g=function(e){var t=e.src,r=e.srcSet,n=R.useState(!1),i=n[0],o=n[1];return R.useEffect((function(){if(t||r){o(!1);var e=!0,n=new Image;return n.src=t,n.srcSet=r,n.onload=function(){e&&o("loaded")},n.onerror=function(){e&&o("error")},function(){e=!1}}}),[t,r]),i}({src:u,srcSet:d}),v=u||d,y=v&&"error"!==g;return m=y?R.createElement("img",(0,P.Z)({alt:r,src:u,srcSet:d,sizes:l,className:i.img},c)):null!=n?n:v&&r?r[0]:R.createElement(Me,{className:i.fallback}),R.createElement(s,(0,P.Z)({className:(0,N.Z)(i.root,i.system,i[h],o,!y&&i.colorDefault),ref:t},p),m)}));const Ie=(0,q.Z)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},circle:{},circular:{},rounded:{borderRadius:e.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}}),{name:"MuiAvatar"})(Ce);var Te=r(55660),Pe=r(19219),Oe=r(27898),Re={entering:{opacity:1},entered:{opacity:1}},Ne={enter:z.x9.enteringScreen,exit:z.x9.leavingScreen},Be=R.forwardRef((function(e,t){var r=e.children,n=e.disableStrictModeCompat,i=void 0!==n&&n,o=e.in,a=e.onEnter,s=e.onEntered,c=e.onEntering,l=e.onExit,u=e.onExited,d=e.onExiting,f=e.style,h=e.TransitionComponent,p=void 0===h?Te.ZP:h,m=e.timeout,g=void 0===m?Ne:m,v=(0,O.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),y=(0,Z.Z)(),b=y.unstable_strictMode&&!i,w=R.useRef(null),x=(0,Oe.Z)(r.ref,t),_=(0,Oe.Z)(b?w:void 0,x),E=function(e){return function(t,r){if(e){var n=b?[w.current,t]:[t,r],i=(0,se.Z)(n,2),o=i[0],a=i[1];void 0===a?e(o):e(o,a)}}},k=E(c),S=E((function(e,t){(0,Pe.n)(e);var r=(0,Pe.C)({style:f,timeout:g},{mode:"enter"});e.style.webkitTransition=y.transitions.create("opacity",r),e.style.transition=y.transitions.create("opacity",r),a&&a(e,t)})),A=E(s),M=E(d),C=E((function(e){var t=(0,Pe.C)({style:f,timeout:g},{mode:"exit"});e.style.webkitTransition=y.transitions.create("opacity",t),e.style.transition=y.transitions.create("opacity",t),l&&l(e)})),I=E(u);return R.createElement(p,(0,P.Z)({appear:!0,in:o,nodeRef:b?w:void 0,onEnter:S,onEntered:A,onEntering:k,onExit:C,onExited:I,onExiting:M,timeout:g},v),(function(e,t){return R.cloneElement(r,(0,P.Z)({style:(0,P.Z)({opacity:0,visibility:"exited"!==e||o?void 0:"hidden"},Re[e],f,r.props.style),ref:_},t))}))}));const Le=Be;var je=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.invisible,a=void 0!==o&&o,s=e.open,c=e.transitionDuration,l=e.TransitionComponent,u=void 0===l?Le:l,d=(0,O.Z)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return R.createElement(u,(0,P.Z)({in:s,timeout:c},d),R.createElement("div",{className:(0,N.Z)(n.root,i,a&&n.invisible),"aria-hidden":!0,ref:t},r))}));const De=(0,q.Z)({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(je);var Fe=R.forwardRef((function(e,t){var r=e.anchorOrigin,n=void 0===r?{vertical:"top",horizontal:"right"}:r,i=e.badgeContent,o=e.children,a=e.classes,s=e.className,c=e.color,l=void 0===c?"default":c,u=e.component,d=void 0===u?"span":u,f=e.invisible,h=e.max,p=void 0===h?99:h,m=e.overlap,g=void 0===m?"rectangle":m,v=e.showZero,y=void 0!==v&&v,b=e.variant,w=void 0===b?"standard":b,x=(0,O.Z)(e,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),_=f;null==f&&(0===i&&!y||null==i&&"dot"!==w)&&(_=!0);var E="";return"dot"!==w&&(E=i>p?"".concat(p,"+"):i),R.createElement(d,(0,P.Z)({className:(0,N.Z)(a.root,s),ref:t},x),o,R.createElement("span",{className:(0,N.Z)(a.badge,a["".concat(n.horizontal).concat((0,Ee.Z)(n.vertical),"}")],a["anchorOrigin".concat((0,Ee.Z)(n.vertical)).concat((0,Ee.Z)(n.horizontal)).concat((0,Ee.Z)(g))],"default"!==l&&a["color".concat((0,Ee.Z)(l))],_&&a.invisible,"dot"===w&&a.dot)},E))}));const Ue=(0,q.Z)((function(e){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorError:{backgroundColor:e.palette.error.main,color:e.palette.error.contrastText},dot:{borderRadius:4,height:8,minWidth:8,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginTopRightRectangular:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginBottomRightRectangular:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginTopLeftRectangular:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginBottomLeftRectangular:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginTopRightCircular:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginBottomRightCircular:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginTopLeftCircular:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginBottomLeftCircular:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}}),{name:"MuiBadge"})(Fe);var ze=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.component,a=void 0===o?"div":o,s=e.onChange,c=e.showLabels,l=void 0!==c&&c,u=e.value,d=(0,O.Z)(e,["children","classes","className","component","onChange","showLabels","value"]);return R.createElement(a,(0,P.Z)({className:(0,N.Z)(n.root,i),ref:t},d),R.Children.map(r,(function(e,t){if(!R.isValidElement(e))return null;var r=void 0===e.props.value?t:e.props.value;return R.cloneElement(e,{selected:r===u,showLabel:void 0!==e.props.showLabel?e.props.showLabel:l,value:r,onChange:s})})))}));const Ze=(0,q.Z)((function(e){return{root:{display:"flex",justifyContent:"center",height:56,backgroundColor:e.palette.background.paper}}}),{name:"MuiBottomNavigation"})(ze);var qe=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.icon,o=e.label,a=e.onChange,s=e.onClick,c=e.selected,l=e.showLabel,u=e.value,d=(0,O.Z)(e,["classes","className","icon","label","onChange","onClick","selected","showLabel","value"]);return R.createElement(be.Z,(0,P.Z)({ref:t,className:(0,N.Z)(r.root,n,c?r.selected:!l&&r.iconOnly),focusRipple:!0,onClick:function(e){a&&a(e,u),s&&s(e)}},d),R.createElement("span",{className:r.wrapper},i,R.createElement("span",{className:(0,N.Z)(r.label,c?r.selected:!l&&r.iconOnly)},o)))}));const He=(0,q.Z)((function(e){return{root:{transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"6px 12px 8px",minWidth:80,maxWidth:168,color:e.palette.text.secondary,flex:"1","&$iconOnly":{paddingTop:16},"&$selected":{paddingTop:6,color:e.palette.primary.main}},selected:{},iconOnly:{},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"},label:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s","&$iconOnly":{opacity:0,transitionDelay:"0s"},"&$selected":{fontSize:e.typography.pxToRem(14)}}}}),{name:"MuiBottomNavigationAction"})(qe);var Ve=r(19961),We=r(49030);function $e(e,t){var r={};return Object.keys(e).forEach((function(n){-1===t.indexOf(n)&&(r[n]=e[n])})),r}function Ke(e){var t=function(t){var r=e(t);return t.css?(0,P.Z)({},(0,We.Z)(r,e((0,P.Z)({theme:t.theme},t.css))),$e(t.css,[e.filterProps])):t.sx?(0,P.Z)({},(0,We.Z)(r,e((0,P.Z)({theme:t.theme},t.sx))),$e(t.sx,[e.filterProps])):r};return t.propTypes={},t.filterProps=["css","sx"].concat((0,Ve.Z)(e.filterProps)),t}const Ge=Ke;const Ye=function(){for(var e=arguments.length,t=new Array(e),r=0;r=e.length?e:[].concat((0,Ve.Z)(e.slice(0,f)),[R.createElement(Et,{"aria-label":c,key:"ellipsis",onClick:function(e){w(!0);var t=e.currentTarget.parentNode.querySelector("a[href],button,[tabindex]");t&&t.focus()}})],(0,Ve.Z)(e.slice(e.length-u,e.length)))}(x),n.separator,g)))}));const St=(0,q.Z)({root:{},ol:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"},li:{},separator:{display:"flex",userSelect:"none",marginLeft:8,marginRight:8}},{name:"MuiBreadcrumbs"})(kt);var At=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,c=void 0===s?"button":s,l=e.disabled,u=void 0!==l&&l,d=e.disableElevation,f=void 0!==d&&d,h=e.disableFocusRipple,p=void 0!==h&&h,m=e.endIcon,g=e.focusVisibleClassName,v=e.fullWidth,y=void 0!==v&&v,b=e.size,w=void 0===b?"medium":b,x=e.startIcon,_=e.type,E=void 0===_?"button":_,k=e.variant,S=void 0===k?"text":k,A=(0,O.Z)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),M=x&&R.createElement("span",{className:(0,N.Z)(n.startIcon,n["iconSize".concat((0,Ee.Z)(w))])},x),C=m&&R.createElement("span",{className:(0,N.Z)(n.endIcon,n["iconSize".concat((0,Ee.Z)(w))])},m);return R.createElement(be.Z,(0,P.Z)({className:(0,N.Z)(n.root,n[S],i,"inherit"===a?n.colorInherit:"default"!==a&&n["".concat(S).concat((0,Ee.Z)(a))],"medium"!==w&&[n["".concat(S,"Size").concat((0,Ee.Z)(w))],n["size".concat((0,Ee.Z)(w))]],f&&n.disableElevation,u&&n.disabled,y&&n.fullWidth),component:c,disabled:u,focusRipple:!p,focusVisibleClassName:(0,N.Z)(n.focusVisible,g),ref:t,type:E},A),R.createElement("span",{className:n.label},M,r,C))}));const Mt=(0,q.Z)((function(e){return{root:(0,P.Z)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,k.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,k.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,k.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,k.Fq)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,k.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,k.Fq)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,k.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(At);Mt.styles;var Ct=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,c=void 0===s?"div":s,l=e.disabled,u=void 0!==l&&l,d=e.disableElevation,f=void 0!==d&&d,h=e.disableFocusRipple,p=void 0!==h&&h,m=e.disableRipple,g=void 0!==m&&m,v=e.fullWidth,y=void 0!==v&&v,b=e.orientation,w=void 0===b?"horizontal":b,x=e.size,_=void 0===x?"medium":x,E=e.variant,k=void 0===E?"outlined":E,S=(0,O.Z)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"]),A=(0,N.Z)(n.grouped,n["grouped".concat((0,Ee.Z)(w))],n["grouped".concat((0,Ee.Z)(k))],n["grouped".concat((0,Ee.Z)(k)).concat((0,Ee.Z)(w))],n["grouped".concat((0,Ee.Z)(k)).concat("default"!==a?(0,Ee.Z)(a):"")],u&&n.disabled);return R.createElement(c,(0,P.Z)({role:"group",className:(0,N.Z)(n.root,i,y&&n.fullWidth,f&&n.disableElevation,"contained"===k&&n.contained,"vertical"===w&&n.vertical),ref:t},S),R.Children.map(r,(function(e){return R.isValidElement(e)?R.cloneElement(e,{className:(0,N.Z)(A,e.props.className),color:e.props.color||a,disabled:e.props.disabled||u,disableElevation:e.props.disableElevation||f,disableFocusRipple:p,disableRipple:g,fullWidth:y,size:e.props.size||_,variant:e.props.variant||k}):null})))}));const It=(0,q.Z)((function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},contained:{boxShadow:e.shadows[2]},disableElevation:{boxShadow:"none"},disabled:{},fullWidth:{width:"100%"},vertical:{flexDirection:"column"},grouped:{minWidth:40},groupedHorizontal:{"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{borderTopRightRadius:0,borderTopLeftRadius:0},"&:not(:last-child)":{borderBottomRightRadius:0,borderBottomLeftRadius:0}},groupedText:{},groupedTextHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:(0,k.Fq)(e.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:(0,k.Fq)(e.palette.secondary.main,.5)}},groupedOutlined:{},groupedOutlinedHorizontal:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedVertical:{"&:not(:first-child)":{marginTop:-1},"&:not(:last-child)":{borderBottomColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:e.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:e.palette.secondary.main}},groupedContained:{boxShadow:"none"},groupedContainedHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderBottom:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderColor:e.palette.primary.dark}},groupedContainedSecondary:{"&:not(:last-child)":{borderColor:e.palette.secondary.dark}}}}),{name:"MuiButtonGroup"})(Ct);var Tt=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.raised,o=void 0!==i&&i,a=(0,O.Z)(e,["classes","className","raised"]);return R.createElement(ue,(0,P.Z)({className:(0,N.Z)(r.root,n),elevation:o?8:1,ref:t},a))}));const Pt=(0,q.Z)({root:{overflow:"hidden"}},{name:"MuiCard"})(Tt);var Ot=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.focusVisibleClassName,a=(0,O.Z)(e,["children","classes","className","focusVisibleClassName"]);return R.createElement(be.Z,(0,P.Z)({className:(0,N.Z)(n.root,i),focusVisibleClassName:(0,N.Z)(o,n.focusVisible),ref:t},a),r,R.createElement("span",{className:n.focusHighlight}))}));const Rt=(0,q.Z)((function(e){return{root:{display:"block",textAlign:"inherit",width:"100%","&:hover $focusHighlight":{opacity:e.palette.action.hoverOpacity},"&$focusVisible $focusHighlight":{opacity:.12}},focusVisible:{},focusHighlight:{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}}}),{name:"MuiCardActionArea"})(Ot);var Nt=R.forwardRef((function(e,t){var r=e.disableSpacing,n=void 0!==r&&r,i=e.classes,o=e.className,a=(0,O.Z)(e,["disableSpacing","classes","className"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(i.root,o,!n&&i.spacing),ref:t},a))}));const Bt=(0,q.Z)({root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiCardActions"})(Nt);var Lt=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?"div":i,a=(0,O.Z)(e,["classes","className","component"]);return R.createElement(o,(0,P.Z)({className:(0,N.Z)(r.root,n),ref:t},a))}));const jt=(0,q.Z)({root:{padding:16,"&:last-child":{paddingBottom:24}}},{name:"MuiCardContent"})(Lt);var Dt=R.forwardRef((function(e,t){var r=e.action,n=e.avatar,i=e.classes,o=e.className,a=e.component,s=void 0===a?"div":a,c=e.disableTypography,l=void 0!==c&&c,u=e.subheader,d=e.subheaderTypographyProps,f=e.title,h=e.titleTypographyProps,p=(0,O.Z)(e,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),m=f;null==m||m.type===xt.Z||l||(m=R.createElement(xt.Z,(0,P.Z)({variant:n?"body2":"h5",className:i.title,component:"span",display:"block"},h),m));var g=u;return null==g||g.type===xt.Z||l||(g=R.createElement(xt.Z,(0,P.Z)({variant:n?"body2":"body1",className:i.subheader,color:"textSecondary",component:"span",display:"block"},d),g)),R.createElement(s,(0,P.Z)({className:(0,N.Z)(i.root,o),ref:t},p),n&&R.createElement("div",{className:i.avatar},n),R.createElement("div",{className:i.content},m,g),r&&R.createElement("div",{className:i.action},r))}));const Ft=(0,q.Z)({root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}},{name:"MuiCardHeader"})(Dt);var Ut=["video","audio","picture","iframe","img"],zt=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.component,a=void 0===o?"div":o,s=e.image,c=e.src,l=e.style,u=(0,O.Z)(e,["children","classes","className","component","image","src","style"]),d=-1!==Ut.indexOf(a),f=!d&&s?(0,P.Z)({backgroundImage:'url("'.concat(s,'")')},l):l;return R.createElement(a,(0,P.Z)({className:(0,N.Z)(n.root,i,d&&n.media,-1!=="picture img".indexOf(a)&&n.img),ref:t,style:f,src:d?s||c:void 0},u),r)}));const Zt=(0,q.Z)({root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}},{name:"MuiCardMedia"})(zt);var qt=R.createContext();function Ht(){return R.useContext(qt)}const Vt=qt;function Wt(){return R.useContext(Vt)}var $t=R.forwardRef((function(e,t){var r=e.autoFocus,n=e.checked,i=e.checkedIcon,o=e.classes,a=e.className,s=e.defaultChecked,c=e.disabled,l=e.icon,u=e.id,d=e.inputProps,f=e.inputRef,h=e.name,p=e.onBlur,m=e.onChange,g=e.onFocus,v=e.readOnly,y=e.required,b=e.tabIndex,w=e.type,x=e.value,_=(0,O.Z)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),E=(0,fe.Z)({controlled:n,default:Boolean(s),name:"SwitchBase",state:"checked"}),k=(0,se.Z)(E,2),S=k[0],A=k[1],M=Wt(),C=c;M&&"undefined"===typeof C&&(C=M.disabled);var I="checkbox"===w||"radio"===w;return R.createElement(we.Z,(0,P.Z)({component:"span",className:(0,N.Z)(o.root,a,S&&o.checked,C&&o.disabled),disabled:C,tabIndex:null,role:void 0,onFocus:function(e){g&&g(e),M&&M.onFocus&&M.onFocus(e)},onBlur:function(e){p&&p(e),M&&M.onBlur&&M.onBlur(e)},ref:t},_),R.createElement("input",(0,P.Z)({autoFocus:r,checked:n,defaultChecked:s,className:o.input,disabled:C,id:I&&u,name:h,onChange:function(e){var t=e.target.checked;A(t),m&&m(e,t)},readOnly:v,ref:f,required:y,tabIndex:b,type:w,value:x},d)),S?i:l)}));const Kt=(0,q.Z)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})($t),Gt=(0,Ae.Z)(R.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Yt=(0,Ae.Z)(R.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Jt=(0,Ae.Z)(R.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var Xt=R.createElement(Yt,null),Qt=R.createElement(Gt,null),er=R.createElement(Jt,null),tr=R.forwardRef((function(e,t){var r=e.checkedIcon,n=void 0===r?Xt:r,i=e.classes,o=e.color,a=void 0===o?"secondary":o,s=e.icon,c=void 0===s?Qt:s,l=e.indeterminate,u=void 0!==l&&l,d=e.indeterminateIcon,f=void 0===d?er:d,h=e.inputProps,p=e.size,m=void 0===p?"medium":p,g=(0,O.Z)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),v=u?f:c,y=u?f:n;return R.createElement(Kt,(0,P.Z)({type:"checkbox",classes:{root:(0,N.Z)(i.root,i["color".concat((0,Ee.Z)(a))],u&&i.indeterminate),checked:i.checked,disabled:i.disabled},color:a,inputProps:(0,P.Z)({"data-indeterminate":u},h),icon:R.cloneElement(v,{fontSize:void 0===v.props.fontSize&&"small"===m?m:v.props.fontSize}),checkedIcon:R.cloneElement(y,{fontSize:void 0===y.props.fontSize&&"small"===m?m:y.props.fontSize}),ref:t},g))}));const rr=(0,q.Z)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,k.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,k.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(tr),nr=(0,Ae.Z)(R.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function ir(e){return"Backspace"===e.key||"Delete"===e.key}var or=R.forwardRef((function(e,t){var r=e.avatar,n=e.classes,i=e.className,o=e.clickable,a=e.color,s=void 0===a?"default":a,c=e.component,l=e.deleteIcon,u=e.disabled,d=void 0!==u&&u,f=e.icon,h=e.label,p=e.onClick,m=e.onDelete,g=e.onKeyDown,v=e.onKeyUp,y=e.size,b=void 0===y?"medium":y,w=e.variant,x=void 0===w?"default":w,_=(0,O.Z)(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),E=R.useRef(null),k=(0,Oe.Z)(E,t),S=function(e){e.stopPropagation(),m&&m(e)},A=!(!1===o||!p)||o,M="small"===b,C=c||(A?be.Z:"div"),I=C===be.Z?{component:"div"}:{},T=null;if(m){var B=(0,N.Z)("default"!==s&&("default"===x?n["deleteIconColor".concat((0,Ee.Z)(s))]:n["deleteIconOutlinedColor".concat((0,Ee.Z)(s))]),M&&n.deleteIconSmall);T=l&&R.isValidElement(l)?R.cloneElement(l,{className:(0,N.Z)(l.props.className,n.deleteIcon,B),onClick:S}):R.createElement(nr,{className:(0,N.Z)(n.deleteIcon,B),onClick:S})}var L=null;r&&R.isValidElement(r)&&(L=R.cloneElement(r,{className:(0,N.Z)(n.avatar,r.props.className,M&&n.avatarSmall,"default"!==s&&n["avatarColor".concat((0,Ee.Z)(s))])}));var j=null;return f&&R.isValidElement(f)&&(j=R.cloneElement(f,{className:(0,N.Z)(n.icon,f.props.className,M&&n.iconSmall,"default"!==s&&n["iconColor".concat((0,Ee.Z)(s))])})),R.createElement(C,(0,P.Z)({role:A||m?"button":void 0,className:(0,N.Z)(n.root,i,"default"!==s&&[n["color".concat((0,Ee.Z)(s))],A&&n["clickableColor".concat((0,Ee.Z)(s))],m&&n["deletableColor".concat((0,Ee.Z)(s))]],"default"!==x&&[n.outlined,{primary:n.outlinedPrimary,secondary:n.outlinedSecondary}[s]],d&&n.disabled,M&&n.sizeSmall,A&&n.clickable,m&&n.deletable),"aria-disabled":!!d||void 0,tabIndex:A||m?0:void 0,onClick:p,onKeyDown:function(e){e.currentTarget===e.target&&ir(e)&&e.preventDefault(),g&&g(e)},onKeyUp:function(e){e.currentTarget===e.target&&(m&&ir(e)?m(e):"Escape"===e.key&&E.current&&E.current.blur()),v&&v(e)},ref:k},I,_),L||j,R.createElement("span",{className:(0,N.Z)(n.label,M&&n.labelSmall)},h),T)}));const ar=(0,q.Z)((function(e){var t="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],r=(0,k.Fq)(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(t),backgroundColor:t,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:(0,k._4)(t,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:(0,k._4)(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:(0,k._4)(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:(0,k._4)(t,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:(0,k._4)(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:(0,k._4)(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,k.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,k.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,k.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:r,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:(0,k.Fq)(r,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:(0,k.Fq)(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:(0,k.Fq)(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:(0,k.Fq)(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:(0,k.Fq)(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}}),{name:"MuiChip"})(or);var sr=44,cr=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.color,o=void 0===i?"primary":i,a=e.disableShrink,s=void 0!==a&&a,c=e.size,l=void 0===c?40:c,u=e.style,d=e.thickness,f=void 0===d?3.6:d,h=e.value,p=void 0===h?0:h,m=e.variant,g=void 0===m?"indeterminate":m,v=(0,O.Z)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),y={},b={},w={};if("determinate"===g||"static"===g){var x=2*Math.PI*((sr-f)/2);y.strokeDasharray=x.toFixed(3),w["aria-valuenow"]=Math.round(p),y.strokeDashoffset="".concat(((100-p)/100*x).toFixed(3),"px"),b.transform="rotate(-90deg)"}return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n,"inherit"!==o&&r["color".concat((0,Ee.Z)(o))],{determinate:r.determinate,indeterminate:r.indeterminate,static:r.static}[g]),style:(0,P.Z)({width:l,height:l},b,u),ref:t,role:"progressbar"},w,v),R.createElement("svg",{className:r.svg,viewBox:"".concat(22," ").concat(22," ").concat(sr," ").concat(sr)},R.createElement("circle",{className:(0,N.Z)(r.circle,s&&r.circleDisableShrink,{determinate:r.circleDeterminate,indeterminate:r.circleIndeterminate,static:r.circleStatic}[g]),style:y,cx:sr,cy:sr,r:(sr-f)/2,fill:"none",strokeWidth:f})))}));const lr=(0,q.Z)((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(cr);var ur=r(73506),dr=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?"div":i,a=e.disableGutters,s=void 0!==a&&a,c=e.fixed,l=void 0!==c&&c,u=e.maxWidth,d=void 0===u?"lg":u,f=(0,O.Z)(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return R.createElement(o,(0,P.Z)({className:(0,N.Z)(r.root,n,l&&r.fixed,s&&r.disableGutters,!1!==d&&r["maxWidth".concat((0,Ee.Z)(String(d)))]),ref:t},f))}));const fr=(0,q.Z)((function(e){return{root:(0,Je.Z)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce((function(t,r){var n=e.breakpoints.values[r];return 0!==n&&(t[e.breakpoints.up(r)]={maxWidth:n}),t}),{}),maxWidthXs:(0,Je.Z)({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:(0,Je.Z)({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:(0,Je.Z)({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:(0,Je.Z)({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:(0,Je.Z)({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}}),{name:"MuiContainer"})(dr);var hr=r(28710),pr=r(9339),mr=r(40807),gr=r(2320),vr=r(6711);var yr="undefined"!==typeof window?R.useLayoutEffect:R.useEffect;const br=R.forwardRef((function(e,t){var r=e.children,n=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=R.useState(null),c=s[0],l=s[1],u=(0,Oe.Z)(R.isValidElement(r)?r.ref:null,t);return yr((function(){o||l(function(e){return e="function"===typeof e?e():e,pr.findDOMNode(e)}(n)||document.body)}),[n,o]),yr((function(){if(c&&!o)return(0,vr.Z)(t,c),function(){(0,vr.Z)(t,null)}}),[t,c,o]),yr((function(){a&&(c||o)&&a()}),[a,c,o]),o?R.isValidElement(r)?R.cloneElement(r,{ref:u}):r:c?pr.createPortal(r,c):c}));var wr=r(76702),xr=r(11964),_r=r(4563);function Er(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}var kr=r(45095);function Sr(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ar(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Mr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[t,r].concat((0,Ve.Z)(n)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===a.indexOf(e.tagName)&&Sr(e,i)}))}function Cr(e,t){var r=-1;return e.some((function(e,n){return!!t(e)&&(r=n,!0)})),r}function Ir(e,t){var r,n=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=(0,gr.Z)(e);return t.body===e?(0,kr.Z)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=Er();n.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(Ar(o)+a,"px"),r=(0,gr.Z)(o).querySelectorAll(".mui-fixed"),[].forEach.call(r,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Ar(e)+a,"px")}))}var s=o.parentElement,c="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;n.push({value:c.style.overflow,key:"overflow",el:c}),c.style.overflow="hidden"}return function(){r&&[].forEach.call(r,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),n.forEach((function(e){var t=e.value,r=e.el,n=e.key;t?r.style.setProperty(n,t):r.style.removeProperty(n)}))}}var Tr=function(){function e(){G(this,e),this.modals=[],this.containers=[]}return(0,Y.Z)(e,[{key:"add",value:function(e,t){var r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Sr(e.modalRef,!1);var n=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Mr(t,e.mountNode,e.modalRef,n,!0);var i=Cr(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:n}),r)}},{key:"mount",value:function(e,t){var r=Cr(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[r];n.restore||(n.restore=Ir(n,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var r=Cr(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[r];if(n.modals.splice(n.modals.indexOf(e),1),this.modals.splice(t,1),0===n.modals.length)n.restore&&n.restore(),e.modalRef&&Sr(e.modalRef,!0),Mr(n.container,e.mountNode,e.modalRef,n.hiddenSiblingNodes,!1),this.containers.splice(r,1);else{var i=n.modals[n.modals.length-1];i.modalRef&&Sr(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();const Pr=function(e){var t=e.children,r=e.disableAutoFocus,n=void 0!==r&&r,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,c=e.getDoc,l=e.isEnabled,u=e.open,d=R.useRef(),f=R.useRef(null),h=R.useRef(null),p=R.useRef(),m=R.useRef(null),g=R.useCallback((function(e){m.current=pr.findDOMNode(e)}),[]),v=(0,Oe.Z)(t.ref,g),y=R.useRef();return R.useEffect((function(){y.current=u}),[u]),!y.current&&u&&"undefined"!==typeof window&&(p.current=c().activeElement),R.useEffect((function(){if(u){var e=(0,gr.Z)(m.current);n||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){null!==m.current&&(e.hasFocus()&&!o&&l()&&!d.current?m.current&&!m.current.contains(e.activeElement)&&m.current.focus():d.current=!1)},r=function(t){!o&&l()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():f.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",r,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",r,!0),s||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[n,o,s,l,u]),R.createElement(R.Fragment,null,R.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelStart"}),R.cloneElement(t,{ref:v}),R.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))};var Or={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}};const Rr=R.forwardRef((function(e,t){var r=e.invisible,n=void 0!==r&&r,i=e.open,o=(0,O.Z)(e,["invisible","open"]);return i?R.createElement("div",(0,P.Z)({"aria-hidden":!0,ref:t},o,{style:(0,P.Z)({},Or.root,n?Or.invisible:{},o.style)})):null}));var Nr=new Tr;const Br=R.forwardRef((function(e,t){var r=(0,H.Z)(),n=(0,mr.Z)({name:"MuiModal",props:(0,P.Z)({},e),theme:r}),i=n.BackdropComponent,o=void 0===i?Rr:i,a=n.BackdropProps,s=n.children,c=n.closeAfterTransition,l=void 0!==c&&c,u=n.container,d=n.disableAutoFocus,f=void 0!==d&&d,h=n.disableBackdropClick,p=void 0!==h&&h,m=n.disableEnforceFocus,g=void 0!==m&&m,v=n.disableEscapeKeyDown,y=void 0!==v&&v,b=n.disablePortal,w=void 0!==b&&b,x=n.disableRestoreFocus,_=void 0!==x&&x,E=n.disableScrollLock,k=void 0!==E&&E,S=n.hideBackdrop,A=void 0!==S&&S,M=n.keepMounted,C=void 0!==M&&M,I=n.manager,T=void 0===I?Nr:I,N=n.onBackdropClick,B=n.onClose,L=n.onEscapeKeyDown,j=n.onRendered,D=n.open,F=(0,O.Z)(n,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),U=R.useState(!0),z=U[0],Z=U[1],q=R.useRef({}),V=R.useRef(null),W=R.useRef(null),$=(0,Oe.Z)(W,t),K=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(n),G=function(){return(0,gr.Z)(V.current)},Y=function(){return q.current.modalRef=W.current,q.current.mountNode=V.current,q.current},J=function(){T.mount(Y(),{disableScrollLock:k}),W.current.scrollTop=0},X=(0,xr.Z)((function(){var e=function(e){return e="function"===typeof e?e():e,pr.findDOMNode(e)}(u)||G().body;T.add(Y(),e),W.current&&J()})),Q=R.useCallback((function(){return T.isTopModal(Y())}),[T]),ee=(0,xr.Z)((function(e){V.current=e,e&&(j&&j(),D&&Q()?J():Sr(W.current,!0))})),te=R.useCallback((function(){T.remove(Y())}),[T]);if(R.useEffect((function(){return function(){te()}}),[te]),R.useEffect((function(){D?X():K&&l||te()}),[D,te,K,l,X]),!C&&!D&&(!K||z))return null;var re=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(r||{zIndex:_r.Z}),ne={};return void 0===s.props.tabIndex&&(ne.tabIndex=s.props.tabIndex||"-1"),K&&(ne.onEnter=(0,wr.Z)((function(){Z(!1)}),s.props.onEnter),ne.onExited=(0,wr.Z)((function(){Z(!0),l&&te()}),s.props.onExited)),R.createElement(br,{ref:ee,container:u,disablePortal:w},R.createElement("div",(0,P.Z)({ref:$,onKeyDown:function(e){"Escape"===e.key&&Q()&&(L&&L(e),y||(e.stopPropagation(),B&&B(e,"escapeKeyDown")))},role:"presentation"},F,{style:(0,P.Z)({},re.root,!D&&z?re.hidden:{},F.style)}),A?null:R.createElement(o,(0,P.Z)({open:D,onClick:function(e){e.target===e.currentTarget&&(N&&N(e),!p&&B&&B(e,"backdropClick"))}},a)),R.createElement(Pr,{disableEnforceFocus:g,disableAutoFocus:f,disableRestoreFocus:_,getDoc:G,isEnabled:Q,open:D},R.cloneElement(s,ne))))}));var Lr={enter:z.x9.enteringScreen,exit:z.x9.leavingScreen},jr=R.forwardRef((function(e,t){var r=e.BackdropProps,n=e.children,i=e.classes,o=e.className,a=e.disableBackdropClick,s=void 0!==a&&a,c=e.disableEscapeKeyDown,l=void 0!==c&&c,u=e.fullScreen,d=void 0!==u&&u,f=e.fullWidth,h=void 0!==f&&f,p=e.maxWidth,m=void 0===p?"sm":p,g=e.onBackdropClick,v=e.onClose,y=e.onEnter,b=e.onEntered,w=e.onEntering,x=e.onEscapeKeyDown,_=e.onExit,E=e.onExited,k=e.onExiting,S=e.open,A=e.PaperComponent,M=void 0===A?ue:A,C=e.PaperProps,I=void 0===C?{}:C,T=e.scroll,B=void 0===T?"paper":T,L=e.TransitionComponent,j=void 0===L?Le:L,D=e.transitionDuration,F=void 0===D?Lr:D,U=e.TransitionProps,z=e["aria-describedby"],Z=e["aria-labelledby"],q=(0,O.Z)(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),H=R.useRef();return R.createElement(Br,(0,P.Z)({className:(0,N.Z)(i.root,o),BackdropComponent:De,BackdropProps:(0,P.Z)({transitionDuration:F},r),closeAfterTransition:!0},s?{disableBackdropClick:s}:{},{disableEscapeKeyDown:l,onEscapeKeyDown:x,onClose:v,open:S,ref:t},q),R.createElement(j,(0,P.Z)({appear:!0,in:S,timeout:F,onEnter:y,onEntering:w,onEntered:b,onExit:_,onExiting:k,onExited:E,role:"none presentation"},U),R.createElement("div",{className:(0,N.Z)(i.container,i["scroll".concat((0,Ee.Z)(B))]),onMouseUp:function(e){e.target===e.currentTarget&&e.target===H.current&&(H.current=null,g&&g(e),!s&&v&&v(e,"backdropClick"))},onMouseDown:function(e){H.current=e.target}},R.createElement(M,(0,P.Z)({elevation:24,role:"dialog","aria-describedby":z,"aria-labelledby":Z},I,{className:(0,N.Z)(i.paper,i["paperScroll".concat((0,Ee.Z)(B))],i["paperWidth".concat((0,Ee.Z)(String(m)))],I.className,d&&i.paperFullScreen,h&&i.paperFullWidth)}),n))))}));const Dr=(0,q.Z)((function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":(0,Je.Z)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":(0,Je.Z)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":(0,Je.Z)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":(0,Je.Z)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":(0,Je.Z)({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}}),{name:"MuiDialog"})(jr);var Fr=R.forwardRef((function(e,t){var r=e.disableSpacing,n=void 0!==r&&r,i=e.classes,o=e.className,a=(0,O.Z)(e,["disableSpacing","classes","className"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(i.root,o,!n&&i.spacing),ref:t},a))}));const Ur=(0,q.Z)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(Fr);var zr=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.dividers,o=void 0!==i&&i,a=(0,O.Z)(e,["classes","className","dividers"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n,o&&r.dividers),ref:t},a))}));const Zr=(0,q.Z)((function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}}),{name:"MuiDialogContent"})(zr);var qr=R.forwardRef((function(e,t){return R.createElement(xt.Z,(0,P.Z)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));const Hr=(0,q.Z)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(qr);var Vr=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=(0,O.Z)(e,["children","classes","className","disableTypography"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(n.root,i),ref:t},s),a?r:R.createElement(xt.Z,{component:"h2",variant:"h6"},r))}));const Wr=(0,q.Z)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(Vr);var $r=R.forwardRef((function(e,t){var r=e.absolute,n=void 0!==r&&r,i=e.classes,o=e.className,a=e.component,s=void 0===a?"hr":a,c=e.flexItem,l=void 0!==c&&c,u=e.light,d=void 0!==u&&u,f=e.orientation,h=void 0===f?"horizontal":f,p=e.role,m=void 0===p?"hr"!==s?"separator":void 0:p,g=e.variant,v=void 0===g?"fullWidth":g,y=(0,O.Z)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return R.createElement(s,(0,P.Z)({className:(0,N.Z)(i.root,o,"fullWidth"!==v&&i[v],n&&i.absolute,l&&i.flexItem,d&&i.light,"vertical"===h&&i.vertical),role:m,ref:t},y))}));const Kr=(0,q.Z)((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,k.Fq)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})($r);var Gr=r(98701),Yr={left:"right",right:"left",top:"down",bottom:"up"};function Jr(e){return-1!==["left","right"].indexOf(e)}function Xr(e,t){return"rtl"===e.direction&&Jr(t)?Yr[t]:t}var Qr={enter:z.x9.enteringScreen,exit:z.x9.leavingScreen},en=R.forwardRef((function(e,t){var r=e.anchor,n=void 0===r?"left":r,i=e.BackdropProps,o=e.children,a=e.classes,s=e.className,c=e.elevation,l=void 0===c?16:c,u=e.ModalProps,d=(u=void 0===u?{}:u).BackdropProps,f=(0,O.Z)(u,["BackdropProps"]),h=e.onClose,p=e.open,m=void 0!==p&&p,g=e.PaperProps,v=void 0===g?{}:g,y=e.SlideProps,b=e.TransitionComponent,w=void 0===b?Gr.Z:b,x=e.transitionDuration,_=void 0===x?Qr:x,E=e.variant,k=void 0===E?"temporary":E,S=(0,O.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),A=(0,Z.Z)(),M=R.useRef(!1);R.useEffect((function(){M.current=!0}),[]);var C=Xr(A,n),I=R.createElement(ue,(0,P.Z)({elevation:"temporary"===k?l:0,square:!0},v,{className:(0,N.Z)(a.paper,a["paperAnchor".concat((0,Ee.Z)(C))],v.className,"temporary"!==k&&a["paperAnchorDocked".concat((0,Ee.Z)(C))])}),o);if("permanent"===k)return R.createElement("div",(0,P.Z)({className:(0,N.Z)(a.root,a.docked,s),ref:t},S),I);var T=R.createElement(w,(0,P.Z)({in:m,direction:Yr[C],timeout:_,appear:M.current},y),I);return"persistent"===k?R.createElement("div",(0,P.Z)({className:(0,N.Z)(a.root,a.docked,s),ref:t},S),T):R.createElement(Br,(0,P.Z)({BackdropProps:(0,P.Z)({},i,d,{transitionDuration:_}),BackdropComponent:De,className:(0,N.Z)(a.root,a.modal,s),open:m,onClose:h,ref:t},S,f),T)}));const tn=(0,q.Z)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(en);const rn=R.createContext({});var nn=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.defaultExpanded,a=void 0!==o&&o,s=e.disabled,c=void 0!==s&&s,l=e.expanded,u=e.onChange,d=e.square,f=void 0!==d&&d,h=e.TransitionComponent,p=void 0===h?ce.Z:h,m=e.TransitionProps,g=(0,O.Z)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),v=(0,fe.Z)({controlled:l,default:a,name:"ExpansionPanel",state:"expanded"}),y=(0,se.Z)(v,2),b=y[0],w=y[1],x=R.useCallback((function(e){w(!b),u&&u(e,!b)}),[b,u,w]),_=ae(R.Children.toArray(r)),E=_[0],k=_.slice(1),S=R.useMemo((function(){return{expanded:b,disabled:c,toggle:x}}),[b,c,x]);return R.createElement(ue,(0,P.Z)({className:(0,N.Z)(n.root,i,b&&n.expanded,c&&n.disabled,!f&&n.rounded),ref:t,square:f},g),R.createElement(rn.Provider,{value:S},E),R.createElement(p,(0,P.Z)({in:b,timeout:"auto"},m),R.createElement("div",{"aria-labelledby":E.props.id,id:E.props["aria-controls"],role:"region"},k)))}));const on=(0,q.Z)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiExpansionPanel"})(nn);var an=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.disableSpacing,o=void 0!==i&&i,a=(0,O.Z)(e,["classes","className","disableSpacing"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n,!o&&r.spacing),ref:t},a))}));const sn=(0,q.Z)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiExpansionPanelActions"})(an);var cn=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=(0,O.Z)(e,["classes","className"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n),ref:t},i))}));const ln=(0,q.Z)((function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}}),{name:"MuiExpansionPanelDetails"})(cn);var un=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.expandIcon,a=e.IconButtonProps,s=e.onBlur,c=e.onClick,l=e.onFocusVisible,u=(0,O.Z)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),d=R.useState(!1),f=d[0],h=d[1],p=R.useContext(rn),m=p.disabled,g=void 0!==m&&m,v=p.expanded,y=p.toggle;return R.createElement(be.Z,(0,P.Z)({focusRipple:!1,disableRipple:!0,disabled:g,component:"div","aria-expanded":v,className:(0,N.Z)(n.root,i,g&&n.disabled,v&&n.expanded,f&&n.focused),onFocusVisible:function(e){h(!0),l&&l(e)},onBlur:function(e){h(!1),s&&s(e)},onClick:function(e){y&&y(e),c&&c(e)},ref:t},u),R.createElement("div",{className:(0,N.Z)(n.content,v&&n.expanded)},r),o&&R.createElement(we.Z,(0,P.Z)({className:(0,N.Z)(n.expandIcon,v&&n.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},a),o))}));const dn=(0,q.Z)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiExpansionPanelSummary"})(un);var fn=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,c=void 0===s?"button":s,l=e.disabled,u=void 0!==l&&l,d=e.disableFocusRipple,f=void 0!==d&&d,h=e.focusVisibleClassName,p=e.size,m=void 0===p?"large":p,g=e.variant,v=void 0===g?"circular":g,y=(0,O.Z)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return R.createElement(be.Z,(0,P.Z)({className:(0,N.Z)(n.root,i,"large"!==m&&n["size".concat((0,Ee.Z)(m))],u&&n.disabled,"extended"===v&&n.extended,{primary:n.primary,secondary:n.secondary,inherit:n.colorInherit}[a]),component:c,disabled:u,focusRipple:!f,focusVisibleClassName:(0,N.Z)(n.focusVisible,h),ref:t},y),R.createElement("span",{className:n.label},r))}));const hn=(0,q.Z)((function(e){return{root:(0,P.Z)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(fn);var pn=r(64907);function mn(e){var t=e.props,r=e.states,n=e.muiFormControl;return r.reduce((function(e,r){return e[r]=t[r],n&&"undefined"===typeof t[r]&&(e[r]=n[r]),e}),{})}var gn=r(88448);function vn(e,t){return parseInt(e[t],10)||0}var yn="undefined"!==typeof window?R.useLayoutEffect:R.useEffect,bn={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},wn=R.forwardRef((function(e,t){var r=e.onChange,n=e.rows,i=e.rowsMax,o=e.rowsMin,a=e.maxRows,s=e.minRows,c=void 0===s?1:s,l=e.style,u=e.value,d=(0,O.Z)(e,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),f=a||i,h=n||o||c,p=R.useRef(null!=u).current,m=R.useRef(null),g=(0,Oe.Z)(t,m),v=R.useRef(null),y=R.useRef(0),b=R.useState({}),w=b[0],x=b[1],_=R.useCallback((function(){var t=m.current,r=window.getComputedStyle(t),n=v.current;n.style.width=r.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");var i=r["box-sizing"],o=vn(r,"padding-bottom")+vn(r,"padding-top"),a=vn(r,"border-bottom-width")+vn(r,"border-top-width"),s=n.scrollHeight-o;n.value="x";var c=n.scrollHeight-o,l=s;h&&(l=Math.max(Number(h)*c,l)),f&&(l=Math.min(Number(f)*c,l));var u=(l=Math.max(l,c))+("border-box"===i?o+a:0),d=Math.abs(l-s)<=1;x((function(e){return y.current<20&&(u>0&&Math.abs((e.outerHeightStyle||0)-u)>1||e.overflow!==d)?(y.current+=1,{overflow:d,outerHeightStyle:u}):e}))}),[f,h,e.placeholder]);R.useEffect((function(){var e=(0,gn.Z)((function(){y.current=0,_()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[_]),yn((function(){_()})),R.useEffect((function(){y.current=0}),[u]);return R.createElement(R.Fragment,null,R.createElement("textarea",(0,P.Z)({value:u,onChange:function(e){y.current=0,p||_(),r&&r(e)},ref:g,rows:h,style:(0,P.Z)({height:w.outerHeightStyle,overflow:w.overflow?"hidden":null},l)},d)),R.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:v,tabIndex:-1,style:(0,P.Z)({},bn,l)}))}));const xn=wn;function _n(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function En(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(_n(e.value)&&""!==e.value||t&&_n(e.defaultValue)&&""!==e.defaultValue)}var kn="undefined"===typeof window?R.useEffect:R.useLayoutEffect,Sn=R.forwardRef((function(e,t){var r=e["aria-describedby"],n=e.autoComplete,i=e.autoFocus,o=e.classes,a=e.className,s=(e.color,e.defaultValue),c=e.disabled,l=e.endAdornment,u=(e.error,e.fullWidth),d=void 0!==u&&u,f=e.id,h=e.inputComponent,p=void 0===h?"input":h,m=e.inputProps,g=void 0===m?{}:m,v=e.inputRef,y=(e.margin,e.multiline),b=void 0!==y&&y,w=e.name,x=e.onBlur,_=e.onChange,E=e.onClick,k=e.onFocus,S=e.onKeyDown,A=e.onKeyUp,M=e.placeholder,C=e.readOnly,I=e.renderSuffix,T=e.rows,B=e.rowsMax,L=e.rowsMin,j=e.maxRows,D=e.minRows,F=e.startAdornment,U=e.type,z=void 0===U?"text":U,Z=e.value,q=(0,O.Z)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),H=null!=g.value?g.value:Z,V=R.useRef(null!=H).current,W=R.useRef(),$=R.useCallback((function(e){0}),[]),K=(0,Oe.Z)(g.ref,$),G=(0,Oe.Z)(v,K),Y=(0,Oe.Z)(W,G),J=R.useState(!1),X=J[0],Q=J[1],ee=Ht();var te=mn({props:e,muiFormControl:ee,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});te.focused=ee?ee.focused:X,R.useEffect((function(){!ee&&c&&X&&(Q(!1),x&&x())}),[ee,c,X,x]);var re=ee&&ee.onFilled,ne=ee&&ee.onEmpty,ie=R.useCallback((function(e){En(e)?re&&re():ne&&ne()}),[re,ne]);kn((function(){V&&ie({value:H})}),[H,ie,V]);R.useEffect((function(){ie(W.current)}),[]);var oe=p,ae=(0,P.Z)({},g,{ref:Y});"string"!==typeof oe?ae=(0,P.Z)({inputRef:Y,type:z},ae,{ref:null}):b?!T||j||D||B||L?(ae=(0,P.Z)({minRows:T||D,rowsMax:B,maxRows:j},ae),oe=xn):oe="textarea":ae=(0,P.Z)({type:z},ae);return R.useEffect((function(){ee&&ee.setAdornedStart(Boolean(F))}),[ee,F]),R.createElement("div",(0,P.Z)({className:(0,N.Z)(o.root,o["color".concat((0,Ee.Z)(te.color||"primary"))],a,te.disabled&&o.disabled,te.error&&o.error,d&&o.fullWidth,te.focused&&o.focused,ee&&o.formControl,b&&o.multiline,F&&o.adornedStart,l&&o.adornedEnd,"dense"===te.margin&&o.marginDense),onClick:function(e){W.current&&e.currentTarget===e.target&&W.current.focus(),E&&E(e)},ref:t},q),F,R.createElement(Vt.Provider,{value:null},R.createElement(oe,(0,P.Z)({"aria-invalid":te.error,"aria-describedby":r,autoComplete:n,autoFocus:i,defaultValue:s,disabled:te.disabled,id:f,onAnimationStart:function(e){ie("mui-auto-fill-cancel"===e.animationName?W.current:{value:"x"})},name:w,placeholder:M,readOnly:C,required:te.required,rows:T,value:H,onKeyDown:S,onKeyUp:A},ae,{className:(0,N.Z)(o.input,g.className,te.disabled&&o.disabled,b&&o.inputMultiline,te.hiddenLabel&&o.inputHiddenLabel,F&&o.inputAdornedStart,l&&o.inputAdornedEnd,"search"===z&&o.inputTypeSearch,"dense"===te.margin&&o.inputMarginDense),onBlur:function(e){x&&x(e),g.onBlur&&g.onBlur(e),ee&&ee.onBlur?ee.onBlur(e):Q(!1)},onChange:function(e){if(!V){var t=e.target||W.current;if(null==t)throw new Error((0,pn.Z)(1));ie({value:t.value})}for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:1,r=parseFloat(e);return"".concat(r/t).concat(String(e).replace(String(r),"")||"px")}var qn=R.forwardRef((function(e,t){var r=e.alignContent,n=void 0===r?"stretch":r,i=e.alignItems,o=void 0===i?"stretch":i,a=e.classes,s=e.className,c=e.component,l=void 0===c?"div":c,u=e.container,d=void 0!==u&&u,f=e.direction,h=void 0===f?"row":f,p=e.item,m=void 0!==p&&p,g=e.justify,v=e.justifyContent,y=void 0===v?"flex-start":v,b=e.lg,w=void 0!==b&&b,x=e.md,_=void 0!==x&&x,E=e.sm,k=void 0!==E&&E,S=e.spacing,A=void 0===S?0:S,M=e.wrap,C=void 0===M?"wrap":M,I=e.xl,T=void 0!==I&&I,B=e.xs,L=void 0!==B&&B,j=e.zeroMinWidth,D=void 0!==j&&j,F=(0,O.Z)(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","justifyContent","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),U=(0,N.Z)(a.root,s,d&&[a.container,0!==A&&a["spacing-xs-".concat(String(A))]],m&&a.item,D&&a.zeroMinWidth,"row"!==h&&a["direction-xs-".concat(String(h))],"wrap"!==C&&a["wrap-xs-".concat(String(C))],"stretch"!==o&&a["align-items-xs-".concat(String(o))],"stretch"!==n&&a["align-content-xs-".concat(String(n))],"flex-start"!==(g||y)&&a["justify-content-xs-".concat(String(g||y))],!1!==L&&a["grid-xs-".concat(String(L))],!1!==k&&a["grid-sm-".concat(String(k))],!1!==_&&a["grid-md-".concat(String(_))],!1!==w&&a["grid-lg-".concat(String(w))],!1!==T&&a["grid-xl-".concat(String(T))]);return R.createElement(l,(0,P.Z)({className:U,ref:t},F))})),Hn=(0,q.Z)((function(e){return(0,P.Z)({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-content-xs-center":{justifyContent:"center"},"justify-content-xs-flex-end":{justifyContent:"flex-end"},"justify-content-xs-space-between":{justifyContent:"space-between"},"justify-content-xs-space-around":{justifyContent:"space-around"},"justify-content-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var r={};return Un.forEach((function(n){var i=e.spacing(n);0!==i&&(r["spacing-".concat(t,"-").concat(n)]={margin:"-".concat(Zn(i,2)),width:"calc(100% + ".concat(Zn(i),")"),"& > $item":{padding:Zn(i,2)}})})),r}(e,"xs"),e.breakpoints.keys.reduce((function(t,r){return function(e,t,r){var n={};zn.forEach((function(e){var t="grid-".concat(r,"-").concat(e);if(!0!==e)if("auto"!==e){var i="".concat(Math.round(e/12*1e8)/1e6,"%");n[t]={flexBasis:i,flexGrow:0,maxWidth:i}}else n[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else n[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===r?(0,P.Z)(e,n):e[t.breakpoints.up(r)]=n}(t,e,r),t}),{}))}),{name:"MuiGrid"})(qn);const Vn=Hn;var Wn=R.forwardRef((function(e,t){var r=e.cellHeight,n=void 0===r?180:r,i=e.children,o=e.classes,a=e.className,s=e.cols,c=void 0===s?2:s,l=e.component,u=void 0===l?"ul":l,d=e.spacing,f=void 0===d?4:d,h=e.style,p=(0,O.Z)(e,["cellHeight","children","classes","className","cols","component","spacing","style"]);return R.createElement(u,(0,P.Z)({className:(0,N.Z)(o.root,a),ref:t,style:(0,P.Z)({margin:-f/2},h)},p),R.Children.map(i,(function(e){if(!R.isValidElement(e))return null;var t=e.props.cols||1,r=e.props.rows||1;return R.cloneElement(e,{style:(0,P.Z)({width:"".concat(100/c*t,"%"),height:"auto"===n?"auto":n*r+f,padding:f/2},e.props.style)})})))}));const $n=(0,q.Z)({root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}},{name:"MuiGridList"})(Wn);var Kn=function(e,t){var r,n,i,o;e&&e.complete&&(e.width/e.height>e.parentElement.offsetWidth/e.parentElement.offsetHeight?((r=e.classList).remove.apply(r,(0,Ve.Z)(t.imgFullWidth.split(" "))),(n=e.classList).add.apply(n,(0,Ve.Z)(t.imgFullHeight.split(" ")))):((i=e.classList).remove.apply(i,(0,Ve.Z)(t.imgFullHeight.split(" "))),(o=e.classList).add.apply(o,(0,Ve.Z)(t.imgFullWidth.split(" ")))))};var Gn=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=(e.cols,e.component),a=void 0===o?"li":o,s=(e.rows,(0,O.Z)(e,["children","classes","className","cols","component","rows"])),c=R.useRef(null);return R.useEffect((function(){!function(e,t){e&&(e.complete?Kn(e,t):e.addEventListener("load",(function(){Kn(e,t)})))}(c.current,n)})),R.useEffect((function(){var e=(0,gn.Z)((function(){Kn(c.current,n)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[n]),R.createElement(a,(0,P.Z)({className:(0,N.Z)(n.root,i),ref:t},s),R.createElement("div",{className:n.tile},R.Children.map(r,(function(e){return R.isValidElement(e)?"img"===e.type||(0,In.Z)(e,["Image"])?R.cloneElement(e,{ref:c}):e:null}))))}));const Yn=(0,q.Z)({root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}},{name:"MuiGridListTile"})(Gn);var Jn=R.forwardRef((function(e,t){var r=e.actionIcon,n=e.actionPosition,i=void 0===n?"right":n,o=e.classes,a=e.className,s=e.subtitle,c=e.title,l=e.titlePosition,u=void 0===l?"bottom":l,d=(0,O.Z)(e,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),f=r&&i;return R.createElement("div",(0,P.Z)({className:(0,N.Z)(o.root,a,"top"===u?o.titlePositionTop:o.titlePositionBottom,s&&o.rootSubtitle),ref:t},d),R.createElement("div",{className:(0,N.Z)(o.titleWrap,{left:o.titleWrapActionPosLeft,right:o.titleWrapActionPosRight}[f])},R.createElement("div",{className:o.title},c),s?R.createElement("div",{className:o.subtitle},s):null),r?R.createElement("div",{className:(0,N.Z)(o.actionIcon,"left"===f&&o.actionIconActionPosLeft)},r):null)}));const Xn=(0,q.Z)((function(e){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:e.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}}),{name:"MuiGridListTileBar"})(Jn);function Qn(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var ei={entering:{opacity:1,transform:Qn(1)},entered:{opacity:1,transform:"none"}},ti=R.forwardRef((function(e,t){var r=e.children,n=e.disableStrictModeCompat,i=void 0!==n&&n,o=e.in,a=e.onEnter,s=e.onEntered,c=e.onEntering,l=e.onExit,u=e.onExited,d=e.onExiting,f=e.style,h=e.timeout,p=void 0===h?"auto":h,m=e.TransitionComponent,g=void 0===m?Te.ZP:m,v=(0,O.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),y=R.useRef(),b=R.useRef(),w=(0,Z.Z)(),x=w.unstable_strictMode&&!i,_=R.useRef(null),E=(0,Oe.Z)(r.ref,t),k=(0,Oe.Z)(x?_:void 0,E),S=function(e){return function(t,r){if(e){var n=x?[_.current,t]:[t,r],i=(0,se.Z)(n,2),o=i[0],a=i[1];void 0===a?e(o):e(o,a)}}},A=S(c),M=S((function(e,t){(0,Pe.n)(e);var r,n=(0,Pe.C)({style:f,timeout:p},{mode:"enter"}),i=n.duration,o=n.delay;"auto"===p?(r=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=r):r=i,e.style.transition=[w.transitions.create("opacity",{duration:r,delay:o}),w.transitions.create("transform",{duration:.666*r,delay:o})].join(","),a&&a(e,t)})),C=S(s),I=S(d),T=S((function(e){var t,r=(0,Pe.C)({style:f,timeout:p},{mode:"exit"}),n=r.duration,i=r.delay;"auto"===p?(t=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=t):t=n,e.style.transition=[w.transitions.create("opacity",{duration:t,delay:i}),w.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=Qn(.75),l&&l(e)})),N=S(u);return R.useEffect((function(){return function(){clearTimeout(y.current)}}),[]),R.createElement(g,(0,P.Z)({appear:!0,in:o,nodeRef:x?_:void 0,onEnter:M,onEntered:C,onEntering:A,onExit:T,onExited:N,onExiting:I,addEndListener:function(e,t){var r=x?e:t;"auto"===p&&(y.current=setTimeout(r,b.current||0))},timeout:"auto"===p?null:p},v),(function(e,t){return R.cloneElement(r,(0,P.Z)({style:(0,P.Z)({opacity:0,transform:Qn(.75),visibility:"exited"!==e||o?void 0:"hidden"},ei[e],f,r.props.style),ref:k},t))}))}));ti.muiSupportAuto=!0;const ri=ti;var ni=r(84108),ii=r.n(ni),oi=r(48010);function ai(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,H.Z)(),n=(0,mr.Z)({theme:r,name:"MuiUseMediaQuery",props:{}});var i="function"===typeof e?e(r):e;i=i.replace(/^@media( ?)/m,"");var o="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,a=(0,P.Z)({},n,t),s=a.defaultMatches,c=void 0!==s&&s,l=a.matchMedia,u=void 0===l?o?window.matchMedia:null:l,d=a.noSsr,f=void 0!==d&&d,h=a.ssrMatchMedia,p=void 0===h?null:h,m=R.useState((function(){return f&&o?u(i).matches:p?p(i).matches:c})),g=m[0],v=m[1];return R.useEffect((function(){var e=!0;if(o){var t=u(i),r=function(){e&&v(t.matches)};return r(),t.addListener(r),function(){e=!1,t.removeListener(r)}}}),[i,u,o]),g}var si=function(e,t){return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?oi.X.indexOf(e)<=oi.X.indexOf(t):oi.X.indexOf(e)2&&void 0!==arguments[2])||arguments[2]?oi.X.indexOf(t)<=oi.X.indexOf(e):oi.X.indexOf(t)0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=e.withTheme,n=void 0!==r&&r,i=e.noSSR,o=void 0!==i&&i,a=e.initialWidth;function s(e){var r=(0,Z.Z)(),i=e.theme||r,s=(0,mr.Z)({theme:i,name:"MuiWithWidth",props:(0,P.Z)({},e)}),c=s.initialWidth,l=s.width,u=(0,O.Z)(s,["initialWidth","width"]),d=R.useState(!1),f=d[0],h=d[1];li((function(){h(!0)}),[]);var p=i.breakpoints.keys.slice().reverse().reduce((function(e,t){var r=ai(i.breakpoints.up(t));return!e&&r?t:e}),null),m=(0,P.Z)({width:l||(f||o?p:void 0)||c||a},n?{theme:i}:{},u);return void 0===m.width?null:R.createElement(t,m)}return L()(s,t),s}};function di(e){var t=e.children,r=e.only,n=e.width,i=(0,Z.Z)(),o=!0;if(r)if(Array.isArray(r))for(var a=0;ae.parentElement.offsetWidth/e.parentElement.offsetHeight?((r=e.classList).remove.apply(r,(0,Ve.Z)(t.imgFullWidth.split(" "))),(n=e.classList).add.apply(n,(0,Ve.Z)(t.imgFullHeight.split(" ")))):((i=e.classList).remove.apply(i,(0,Ve.Z)(t.imgFullHeight.split(" "))),(o=e.classList).add.apply(o,(0,Ve.Z)(t.imgFullWidth.split(" ")))))};var wi=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=(e.cols,e.component),a=void 0===o?"li":o,s=(e.rows,(0,O.Z)(e,["children","classes","className","cols","component","rows"])),c=R.useRef(null);return R.useEffect((function(){!function(e,t){e&&(e.complete?bi(e,t):e.addEventListener("load",(function(){bi(e,t)})))}(c.current,n)})),R.useEffect((function(){var e=(0,gn.Z)((function(){bi(c.current,n)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[n]),R.createElement(a,(0,P.Z)({className:(0,N.Z)(n.root,i),ref:t},s),R.createElement("div",{className:n.item},R.Children.map(r,(function(e){return R.isValidElement(e)?"img"===e.type||(0,In.Z)(e,["Image"])?R.cloneElement(e,{ref:c}):e:null}))))}));const xi=(0,q.Z)({root:{boxSizing:"border-box",flexShrink:0},item:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}},{name:"MuiImageListItem"})(wi);var _i=R.forwardRef((function(e,t){var r=e.actionIcon,n=e.actionPosition,i=void 0===n?"right":n,o=e.classes,a=e.className,s=e.subtitle,c=e.title,l=e.position,u=void 0===l?"bottom":l,d=e.titlePosition,f=(0,O.Z)(e,["actionIcon","actionPosition","classes","className","subtitle","title","position","titlePosition"]),h=d||u,p=r&&i;return R.createElement("div",(0,P.Z)({className:(0,N.Z)(o.root,a,s&&o.rootSubtitle,{bottom:o.positionBottom,top:o.positionTop}[h]),ref:t},f),R.createElement("div",{className:(0,N.Z)(o.titleWrap,{left:o.titleWrapActionPosLeft,right:o.titleWrapActionPosRight}[p])},R.createElement("div",{className:o.title},c),s?R.createElement("div",{className:o.subtitle},s):null),r?R.createElement("div",{className:(0,N.Z)(o.actionIcon,"left"===p&&o.actionIconActionPosLeft)},r):null)}));const Ei=(0,q.Z)((function(e){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},positionBottom:{bottom:0},positionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:e.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}}),{name:"MuiImageListItemBar"})(_i);var ki=R.forwardRef((function(e,t){var r=e.disableUnderline,n=e.classes,i=e.fullWidth,o=void 0!==i&&i,a=e.inputComponent,s=void 0===a?"input":a,c=e.multiline,l=void 0!==c&&c,u=e.type,d=void 0===u?"text":u,f=(0,O.Z)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return R.createElement(An,(0,P.Z)({classes:(0,P.Z)({},n,{root:(0,N.Z)(n.root,!r&&n.underline),underline:null}),fullWidth:o,inputComponent:s,multiline:l,ref:t,type:d},f))}));ki.muiName="Input";const Si=(0,q.Z)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(ki);var Ai=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.component,a=void 0===o?"div":o,s=e.disablePointerEvents,c=void 0!==s&&s,l=e.disableTypography,u=void 0!==l&&l,d=e.position,f=e.variant,h=(0,O.Z)(e,["children","classes","className","component","disablePointerEvents","disableTypography","position","variant"]),p=Ht()||{},m=f;return f&&p.variant,p&&!m&&(m=p.variant),R.createElement(Vt.Provider,{value:null},R.createElement(a,(0,P.Z)({className:(0,N.Z)(n.root,i,"end"===d?n.positionEnd:n.positionStart,c&&n.disablePointerEvents,p.hiddenLabel&&n.hiddenLabel,"filled"===m&&n.filled,"dense"===p.margin&&n.marginDense),ref:t},h),"string"!==typeof r||u?r:R.createElement(xt.Z,{color:"textSecondary"},r)))}));const Mi=(0,q.Z)({root:{display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap"},filled:{"&$positionStart:not($hiddenLabel)":{marginTop:16}},positionStart:{marginRight:8},positionEnd:{marginLeft:8},disablePointerEvents:{pointerEvents:"none"},hiddenLabel:{},marginDense:{}},{name:"MuiInputAdornment"})(Ai);var Ci=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.disableAnimation,o=void 0!==i&&i,a=(e.margin,e.shrink),s=(e.variant,(0,O.Z)(e,["classes","className","disableAnimation","margin","shrink","variant"])),c=Wt(),l=a;"undefined"===typeof l&&c&&(l=c.filled||c.focused||c.adornedStart);var u=mn({props:e,muiFormControl:c,states:["margin","variant"]});return R.createElement(Fn,(0,P.Z)({"data-shrink":l,className:(0,N.Z)(r.root,n,c&&r.formControl,!o&&r.animated,l&&r.shrink,"dense"===u.margin&&r.marginDense,{filled:r.filled,outlined:r.outlined}[u.variant]),classes:{focused:r.focused,disabled:r.disabled,error:r.error,required:r.required,asterisk:r.asterisk},ref:t},s))}));const Ii=(0,q.Z)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(Ci);var Ti=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.color,o=void 0===i?"primary":i,a=e.value,s=e.valueBuffer,c=e.variant,l=void 0===c?"indeterminate":c,u=(0,O.Z)(e,["classes","className","color","value","valueBuffer","variant"]),d=(0,Z.Z)(),f={},h={bar1:{},bar2:{}};if("determinate"===l||"buffer"===l)if(void 0!==a){f["aria-valuenow"]=Math.round(a),f["aria-valuemin"]=0,f["aria-valuemax"]=100;var p=a-100;"rtl"===d.direction&&(p=-p),h.bar1.transform="translateX(".concat(p,"%)")}else 0;if("buffer"===l)if(void 0!==s){var m=(s||0)-100;"rtl"===d.direction&&(m=-m),h.bar2.transform="translateX(".concat(m,"%)")}else 0;return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,r["color".concat((0,Ee.Z)(o))],n,{determinate:r.determinate,indeterminate:r.indeterminate,buffer:r.buffer,query:r.query}[l]),role:"progressbar"},f,{ref:t},u),"buffer"===l?R.createElement("div",{className:(0,N.Z)(r.dashed,r["dashedColor".concat((0,Ee.Z)(o))])}):null,R.createElement("div",{className:(0,N.Z)(r.bar,r["barColor".concat((0,Ee.Z)(o))],("indeterminate"===l||"query"===l)&&r.bar1Indeterminate,{determinate:r.bar1Determinate,buffer:r.bar1Buffer}[l]),style:h.bar1}),"determinate"===l?null:R.createElement("div",{className:(0,N.Z)(r.bar,("indeterminate"===l||"query"===l)&&r.bar2Indeterminate,"buffer"===l?[r["color".concat((0,Ee.Z)(o))],r.bar2Buffer]:r["barColor".concat((0,Ee.Z)(o))]),style:h.bar2}))}));const Pi=(0,q.Z)((function(e){var t=function(t){return"light"===e.palette.type?(0,k.$n)(t,.62):(0,k._j)(t,.5)},r=t(e.palette.primary.main),n=t(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:r},colorSecondary:{backgroundColor:n},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}),{name:"MuiLinearProgress"})(Ti);var Oi=r(6922),Ri=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.color,o=void 0===i?"primary":i,a=e.component,s=void 0===a?"a":a,c=e.onBlur,l=e.onFocus,u=e.TypographyClasses,d=e.underline,f=void 0===d?"hover":d,h=e.variant,p=void 0===h?"inherit":h,m=(0,O.Z)(e,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),g=(0,Oi.Z)(),v=g.isFocusVisible,y=g.onBlurVisible,b=g.ref,w=R.useState(!1),x=w[0],_=w[1],E=(0,Oe.Z)(t,b);return R.createElement(xt.Z,(0,P.Z)({className:(0,N.Z)(r.root,r["underline".concat((0,Ee.Z)(f))],n,x&&r.focusVisible,"button"===s&&r.button),classes:u,color:o,component:s,onBlur:function(e){x&&(y(),_(!1)),c&&c(e)},onFocus:function(e){v(e)&&_(!0),l&&l(e)},ref:E,variant:p},m))}));const Ni=(0,q.Z)({root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}},{name:"MuiLink"})(Ri);const Bi=R.createContext({});var Li=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,c=void 0!==s&&s,l=e.disablePadding,u=void 0!==l&&l,d=e.subheader,f=(0,O.Z)(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=R.useMemo((function(){return{dense:c}}),[c]);return R.createElement(Bi.Provider,{value:h},R.createElement(a,(0,P.Z)({className:(0,N.Z)(n.root,i,c&&n.dense,!u&&n.padding,d&&n.subheader),ref:t},f),d,r))}));const ji=(0,q.Z)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Li);var Di="undefined"===typeof window?R.useEffect:R.useLayoutEffect,Fi=R.forwardRef((function(e,t){var r=e.alignItems,n=void 0===r?"center":r,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,c=e.children,l=e.classes,u=e.className,d=e.component,f=e.ContainerComponent,h=void 0===f?"li":f,p=e.ContainerProps,m=(p=void 0===p?{}:p).className,g=(0,O.Z)(p,["className"]),v=e.dense,y=void 0!==v&&v,b=e.disabled,w=void 0!==b&&b,x=e.disableGutters,_=void 0!==x&&x,E=e.divider,k=void 0!==E&&E,S=e.focusVisibleClassName,A=e.selected,M=void 0!==A&&A,C=(0,O.Z)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),I=R.useContext(Bi),T={dense:y||I.dense||!1,alignItems:n},B=R.useRef(null);Di((function(){o&&B.current&&B.current.focus()}),[o]);var L=R.Children.toArray(c),j=L.length&&(0,In.Z)(L[L.length-1],["ListItemSecondaryAction"]),D=R.useCallback((function(e){B.current=pr.findDOMNode(e)}),[]),F=(0,Oe.Z)(D,t),U=(0,P.Z)({className:(0,N.Z)(l.root,u,T.dense&&l.dense,!_&&l.gutters,k&&l.divider,w&&l.disabled,s&&l.button,"center"!==n&&l.alignItemsFlexStart,j&&l.secondaryAction,M&&l.selected),disabled:w},C),z=d||"li";return s&&(U.component=d||"div",U.focusVisibleClassName=(0,N.Z)(l.focusVisible,S),z=be.Z),j?(z=U.component||d?z:"div","li"===h&&("li"===z?z="div":"li"===U.component&&(U.component="div")),R.createElement(Bi.Provider,{value:T},R.createElement(h,(0,P.Z)({className:(0,N.Z)(l.container,m),ref:F},g),R.createElement(z,U,L),L.pop()))):R.createElement(Bi.Provider,{value:T},R.createElement(z,(0,P.Z)({ref:F},U),L))}));const Ui=(0,q.Z)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(Fi);var zi=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=(0,O.Z)(e,["classes","className"]),o=R.useContext(Bi);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n,"flex-start"===o.alignItems&&r.alignItemsFlexStart),ref:t},i))}));const Zi=(0,q.Z)({root:{minWidth:56,flexShrink:0},alignItemsFlexStart:{marginTop:8}},{name:"MuiListItemAvatar"})(zi);var qi=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=(0,O.Z)(e,["classes","className"]),o=R.useContext(Bi);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n,"flex-start"===o.alignItems&&r.alignItemsFlexStart),ref:t},i))}));const Hi=(0,q.Z)((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(qi);var Vi=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=(0,O.Z)(e,["classes","className"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(r.root,n),ref:t},i))}));Vi.muiName="ListItemSecondaryAction";const Wi=(0,q.Z)({root:{position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"}},{name:"MuiListItemSecondaryAction"})(Vi);var $i=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,c=void 0!==s&&s,l=e.primary,u=e.primaryTypographyProps,d=e.secondary,f=e.secondaryTypographyProps,h=(0,O.Z)(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=R.useContext(Bi).dense,m=null!=l?l:r;null==m||m.type===xt.Z||a||(m=R.createElement(xt.Z,(0,P.Z)({variant:p?"body2":"body1",className:n.primary,component:"span",display:"block"},u),m));var g=d;return null==g||g.type===xt.Z||a||(g=R.createElement(xt.Z,(0,P.Z)({variant:"body2",className:n.secondary,color:"textSecondary",display:"block"},f),g)),R.createElement("div",(0,P.Z)({className:(0,N.Z)(n.root,i,p&&n.dense,c&&n.inset,m&&g&&n.multiline),ref:t},h),m,g)}));const Ki=(0,q.Z)({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})($i);var Gi=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.color,o=void 0===i?"default":i,a=e.component,s=void 0===a?"li":a,c=e.disableGutters,l=void 0!==c&&c,u=e.disableSticky,d=void 0!==u&&u,f=e.inset,h=void 0!==f&&f,p=(0,O.Z)(e,["classes","className","color","component","disableGutters","disableSticky","inset"]);return R.createElement(s,(0,P.Z)({className:(0,N.Z)(r.root,n,"default"!==o&&r["color".concat((0,Ee.Z)(o))],h&&r.inset,!d&&r.sticky,!l&&r.gutters),ref:t},p))}));const Yi=(0,q.Z)((function(e){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:e.palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},colorPrimary:{color:e.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}}),{name:"MuiListSubheader"})(Gi);function Ji(e,t){var r=0;return"number"===typeof t?r=t:"center"===t?r=e.height/2:"bottom"===t&&(r=e.height),r}function Xi(e,t){var r=0;return"number"===typeof t?r=t:"center"===t?r=e.width/2:"right"===t&&(r=e.width),r}function Qi(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function eo(e){return"function"===typeof e?e():e}var to=R.forwardRef((function(e,t){var r=e.action,n=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,c=void 0===s?"anchorEl":s,l=e.children,u=e.classes,d=e.className,f=e.container,h=e.elevation,p=void 0===h?8:h,m=e.getContentAnchorEl,g=e.marginThreshold,v=void 0===g?16:g,y=e.onEnter,b=e.onEntered,w=e.onEntering,x=e.onExit,_=e.onExited,E=e.onExiting,k=e.open,S=e.PaperProps,A=void 0===S?{}:S,M=e.transformOrigin,C=void 0===M?{vertical:"top",horizontal:"left"}:M,I=e.TransitionComponent,T=void 0===I?ri:I,B=e.transitionDuration,L=void 0===B?"auto":B,j=e.TransitionProps,D=void 0===j?{}:j,F=(0,O.Z)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),U=R.useRef(),z=R.useCallback((function(e){if("anchorPosition"===c)return a;var t=eo(n),r=(t&&1===t.nodeType?t:(0,gr.Z)(U.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:r.top+Ji(r,i),left:r.left+Xi(r,o.horizontal)}}),[n,o.horizontal,o.vertical,a,c]),Z=R.useCallback((function(e){var t=0;if(m&&"anchorEl"===c){var r=m(e);if(r&&e.contains(r)){var n=function(e,t){for(var r=t,n=0;r&&r!==e;)n+=(r=r.parentElement).scrollTop;return n}(e,r);t=r.offsetTop+r.clientHeight/2-n||0}0}return t}),[o.vertical,c,m]),q=R.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Ji(e,C.vertical)+t,horizontal:Xi(e,C.horizontal)}}),[C.horizontal,C.vertical]),H=R.useCallback((function(e){var t=Z(e),r={width:e.offsetWidth,height:e.offsetHeight},i=q(r,t);if("none"===c)return{top:null,left:null,transformOrigin:Qi(i)};var o=z(t),a=o.top-i.vertical,s=o.left-i.horizontal,l=a+r.height,u=s+r.width,d=(0,kr.Z)(eo(n)),f=d.innerHeight-v,h=d.innerWidth-v;if(af){var m=l-f;a-=m,i.vertical+=m}if(sh){var y=u-h;s-=y,i.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Qi(i)}}),[n,c,z,Z,q,v]),V=R.useCallback((function(){var e=U.current;if(e){var t=H(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[H]),W=R.useCallback((function(e){U.current=pr.findDOMNode(e)}),[]);R.useEffect((function(){k&&V()})),R.useImperativeHandle(r,(function(){return k?{updatePosition:function(){V()}}:null}),[k,V]),R.useEffect((function(){if(k){var e=(0,gn.Z)((function(){V()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[k,V]);var $=L;"auto"!==L||T.muiSupportAuto||($=void 0);var K=f||(n?(0,gr.Z)(eo(n)).body:void 0);return R.createElement(Br,(0,P.Z)({container:K,open:k,ref:t,BackdropProps:{invisible:!0},className:(0,N.Z)(u.root,d)},F),R.createElement(T,(0,P.Z)({appear:!0,in:k,onEnter:y,onEntered:b,onExit:x,onExited:_,onExiting:E,timeout:$},D,{onEntering:(0,wr.Z)((function(e,t){w&&w(e,t),V()}),D.onEntering)}),R.createElement(ue,(0,P.Z)({elevation:p,ref:W},A,{className:(0,N.Z)(u.paper,A.className)}),l)))}));const ro=(0,q.Z)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(to);function no(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function io(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function oo(e,t){if(void 0===t)return!0;var r=e.innerText;return void 0===r&&(r=e.textContent),0!==(r=r.trim().toLowerCase()).length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function ao(e,t,r,n,i,o){for(var a=!1,s=i(e,t,!!t&&r);s;){if(s===e.firstChild){if(a)return;a=!0}var c=!n&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&oo(s,o)&&!c)return void s.focus();s=i(e,s,r)}}var so="undefined"===typeof window?R.useEffect:R.useLayoutEffect;const co=R.forwardRef((function(e,t){var r=e.actions,n=e.autoFocus,i=void 0!==n&&n,o=e.autoFocusItem,a=void 0!==o&&o,s=e.children,c=e.className,l=e.disabledItemsFocusable,u=void 0!==l&&l,d=e.disableListWrap,f=void 0!==d&&d,h=e.onKeyDown,p=e.variant,m=void 0===p?"selectedMenu":p,g=(0,O.Z)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),v=R.useRef(null),y=R.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});so((function(){i&&v.current.focus()}),[i]),R.useImperativeHandle(r,(function(){return{adjustStyleForScrollbar:function(e,t){var r=!v.current.style.width;if(e.clientHeight0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);var s=n&&!i.repeating&&oo(n,i);i.previousKeyMatched&&(s||ao(t,n,!1,u,no,i))?e.preventDefault():i.previousKeyMatched=!1}h&&h(e)},tabIndex:i?0:-1},g),_)}));var lo={vertical:"top",horizontal:"right"},uo={vertical:"top",horizontal:"left"},fo=R.forwardRef((function(e,t){var r=e.autoFocus,n=void 0===r||r,i=e.children,o=e.classes,a=e.disableAutoFocusItem,s=void 0!==a&&a,c=e.MenuListProps,l=void 0===c?{}:c,u=e.onClose,d=e.onEntering,f=e.open,h=e.PaperProps,p=void 0===h?{}:h,m=e.PopoverClasses,g=e.transitionDuration,v=void 0===g?"auto":g,y=e.TransitionProps,b=(y=void 0===y?{}:y).onEntering,w=(0,O.Z)(y,["onEntering"]),x=e.variant,_=void 0===x?"selectedMenu":x,E=(0,O.Z)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),k=(0,Z.Z)(),S=n&&!s&&f,A=R.useRef(null),M=R.useRef(null),C=-1;R.Children.map(i,(function(e,t){R.isValidElement(e)&&(e.props.disabled||("menu"!==_&&e.props.selected||-1===C)&&(C=t))}));var I=R.Children.map(i,(function(e,t){return t===C?R.cloneElement(e,{ref:function(t){M.current=pr.findDOMNode(t),(0,vr.Z)(e.ref,t)}}):e}));return R.createElement(ro,(0,P.Z)({getContentAnchorEl:function(){return M.current},classes:m,onClose:u,TransitionProps:(0,P.Z)({onEntering:function(e,t){A.current&&A.current.adjustStyleForScrollbar(e,k),d&&d(e,t),b&&b(e,t)}},w),anchorOrigin:"rtl"===k.direction?lo:uo,transformOrigin:"rtl"===k.direction?lo:uo,PaperProps:(0,P.Z)({},p,{classes:(0,P.Z)({},p.classes,{root:o.paper})}),open:f,ref:t,transitionDuration:v},E),R.createElement(co,(0,P.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))},actions:A,autoFocus:n&&(-1===C||s),autoFocusItem:S,variant:_},l,{className:(0,N.Z)(o.list,l.className)}),I))}));const ho=(0,q.Z)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(fo);var po=R.forwardRef((function(e,t){var r,n=e.classes,i=e.className,o=e.component,a=void 0===o?"li":o,s=e.disableGutters,c=void 0!==s&&s,l=e.ListItemClasses,u=e.role,d=void 0===u?"menuitem":u,f=e.selected,h=e.tabIndex,p=(0,O.Z)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(r=void 0!==h?h:-1),R.createElement(Ui,(0,P.Z)({button:!0,role:d,tabIndex:r,component:a,selected:f,disableGutters:c,classes:(0,P.Z)({dense:n.dense},l),className:(0,N.Z)(n.root,i,f&&n.selected,!c&&n.gutters),ref:t},p))}));const mo=(0,q.Z)((function(e){return{root:(0,P.Z)({},e.typography.body1,(0,Je.Z)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:(0,P.Z)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(po);var go=R.forwardRef((function(e,t){var r=e.activeStep,n=void 0===r?0:r,i=e.backButton,o=e.classes,a=e.className,s=e.LinearProgressProps,c=e.nextButton,l=e.position,u=void 0===l?"bottom":l,d=e.steps,f=e.variant,h=void 0===f?"dots":f,p=(0,O.Z)(e,["activeStep","backButton","classes","className","LinearProgressProps","nextButton","position","steps","variant"]);return R.createElement(ue,(0,P.Z)({square:!0,elevation:0,className:(0,N.Z)(o.root,o["position".concat((0,Ee.Z)(u))],a),ref:t},p),i,"text"===h&&R.createElement(R.Fragment,null,n+1," / ",d),"dots"===h&&R.createElement("div",{className:o.dots},(0,Ve.Z)(new Array(d)).map((function(e,t){return R.createElement("div",{key:t,className:(0,N.Z)(o.dot,t===n&&o.dotActive)})}))),"progress"===h&&R.createElement(Pi,(0,P.Z)({className:o.progress,variant:"determinate",value:Math.ceil(n/(d-1)*100)},s)),c)}));const vo=(0,q.Z)((function(e){return{root:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:e.palette.background.default,padding:8},positionBottom:{position:"fixed",bottom:0,left:0,right:0,zIndex:e.zIndex.mobileStepper},positionTop:{position:"fixed",top:0,left:0,right:0,zIndex:e.zIndex.mobileStepper},positionStatic:{},dots:{display:"flex",flexDirection:"row"},dot:{backgroundColor:e.palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},dotActive:{backgroundColor:e.palette.primary.main},progress:{width:"50%"}}}),{name:"MuiMobileStepper"})(go);const yo=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.disabled,o=e.IconComponent,a=e.inputRef,s=e.variant,c=void 0===s?"standard":s,l=(0,O.Z)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return R.createElement(R.Fragment,null,R.createElement("select",(0,P.Z)({className:(0,N.Z)(r.root,r.select,r[c],n,i&&r.disabled),disabled:i,ref:a||t},l)),e.multiple?null:R.createElement(o,{className:(0,N.Z)(r.icon,r["icon".concat((0,Ee.Z)(c))],i&&r.disabled)}))})),bo=(0,Ae.Z)(R.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");var wo=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},xo=R.createElement(Si,null),_o=R.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.IconComponent,o=void 0===i?bo:i,a=e.input,s=void 0===a?xo:a,c=e.inputProps,l=(e.variant,(0,O.Z)(e,["children","classes","IconComponent","input","inputProps","variant"])),u=mn({props:e,muiFormControl:Wt(),states:["variant"]});return R.cloneElement(s,(0,P.Z)({inputComponent:yo,inputProps:(0,P.Z)({children:r,classes:n,IconComponent:o,variant:u.variant,type:void 0},c,s?s.props.inputProps:{}),ref:t},l))}));_o.muiName="Select";const Eo=(0,q.Z)(wo,{name:"MuiNativeSelect"})(_o);var ko="undefined"!==typeof window?R.useLayoutEffect:R.useEffect;const So=function(e){var t=e.children,r=e.defer,n=void 0!==r&&r,i=e.fallback,o=void 0===i?null:i,a=R.useState(!1),s=a[0],c=a[1];return ko((function(){n||c(!0)}),[n]),R.useEffect((function(){n&&c(!0)}),[n]),R.createElement(R.Fragment,null,s?t:o)};var Ao=R.forwardRef((function(e,t){e.children;var r=e.classes,n=e.className,i=e.label,o=e.labelWidth,a=e.notched,s=e.style,c=(0,O.Z)(e,["children","classes","className","label","labelWidth","notched","style"]),l="rtl"===(0,Z.Z)().direction?"right":"left";if(void 0!==i)return R.createElement("fieldset",(0,P.Z)({"aria-hidden":!0,className:(0,N.Z)(r.root,n),ref:t,style:s},c),R.createElement("legend",{className:(0,N.Z)(r.legendLabelled,a&&r.legendNotched)},i?R.createElement("span",null,i):R.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})));var u=o>0?.75*o+8:.01;return R.createElement("fieldset",(0,P.Z)({"aria-hidden":!0,style:(0,P.Z)((0,Je.Z)({},"padding".concat((0,Ee.Z)(l)),8),s),className:(0,N.Z)(r.root,n),ref:t},c),R.createElement("legend",{className:r.legend,style:{width:a?u:.01}},R.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))}));const Mo=(0,q.Z)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(Ao);var Co=R.forwardRef((function(e,t){var r=e.classes,n=e.fullWidth,i=void 0!==n&&n,o=e.inputComponent,a=void 0===o?"input":o,s=e.label,c=e.labelWidth,l=void 0===c?0:c,u=e.multiline,d=void 0!==u&&u,f=e.notched,h=e.type,p=void 0===h?"text":h,m=(0,O.Z)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return R.createElement(An,(0,P.Z)({renderSuffix:function(e){return R.createElement(Mo,{className:r.notchedOutline,label:s,labelWidth:l,notched:"undefined"!==typeof f?f:Boolean(e.startAdornment||e.filled||e.focused)})},classes:(0,P.Z)({},r,{root:(0,N.Z)(r.root,r.underline),notchedOutline:null}),fullWidth:i,inputComponent:a,multiline:d,ref:t,type:p},m))}));Co.muiName="Input";const Io=(0,q.Z)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(Co);var To="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,Po=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();var Oo=To&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),Po))}};function Ro(e){return e&&"[object Function]"==={}.toString.call(e)}function No(e,t){if(1!==e.nodeType)return[];var r=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?r[t]:r}function Bo(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function Lo(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=No(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?e:Lo(Bo(e))}function jo(e){return e&&e.referenceNode?e.referenceNode:e}var Do=To&&!(!window.MSInputMethodContext||!document.documentMode),Fo=To&&/MSIE 10/.test(navigator.userAgent);function Uo(e){return 11===e?Do:10===e?Fo:Do||Fo}function zo(e){if(!e)return document.documentElement;for(var t=Uo(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(r.nodeName)&&"static"===No(r,"position")?zo(r):r:e?e.ownerDocument.documentElement:document.documentElement}function Zo(e){return null!==e.parentNode?Zo(e.parentNode):e}function qo(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,i=r?t:e,o=document.createRange();o.setStart(n,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||n.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||zo(e.firstElementChild)===e)}(a)?a:zo(a);var s=Zo(e);return s.host?qo(s.host,t):qo(e,Zo(t).host)}function Ho(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var n=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||n)[t]}return e[t]}function Vo(e,t){var r="x"===t?"Left":"Top",n="Left"===r?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function Wo(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],Uo(10)?parseInt(r["offset"+e])+parseInt(n["margin"+("Height"===e?"Top":"Left")])+parseInt(n["margin"+("Height"===e?"Bottom":"Right")]):0)}function $o(e){var t=e.body,r=e.documentElement,n=Uo(10)&&getComputedStyle(r);return{height:Wo("Height",t,r,n),width:Wo("Width",t,r,n)}}var Ko=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Go=function(){function e(e,t){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2],n=Uo(10),i="HTML"===t.nodeName,o=Qo(e),a=Qo(t),s=Lo(e),c=No(t),l=parseFloat(c.borderTopWidth),u=parseFloat(c.borderLeftWidth);r&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=Xo({top:o.top-a.top-l,left:o.left-a.left-u,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!n&&i){var f=parseFloat(c.marginTop),h=parseFloat(c.marginLeft);d.top-=l-f,d.bottom-=l-f,d.left-=u-h,d.right-=u-h,d.marginTop=f,d.marginLeft=h}return(n&&!r?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Ho(t,"top"),i=Ho(t,"left"),o=r?-1:1;return e.top+=n*o,e.bottom+=n*o,e.left+=i*o,e.right+=i*o,e}(d,t)),d}function ta(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===No(e,"position"))return!0;var r=Bo(e);return!!r&&ta(r)}function ra(e){if(!e||!e.parentElement||Uo())return document.documentElement;for(var t=e.parentElement;t&&"none"===No(t,"transform");)t=t.parentElement;return t||document.documentElement}function na(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?ra(e):qo(e,jo(t));if("viewport"===n)o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.ownerDocument.documentElement,n=ea(e,r),i=Math.max(r.clientWidth,window.innerWidth||0),o=Math.max(r.clientHeight,window.innerHeight||0),a=t?0:Ho(r),s=t?0:Ho(r,"left");return Xo({top:a-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:o})}(a,i);else{var s=void 0;"scrollParent"===n?"BODY"===(s=Lo(Bo(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===n?e.ownerDocument.documentElement:n;var c=ea(s,a,i);if("HTML"!==s.nodeName||ta(a))o=c;else{var l=$o(e.ownerDocument),u=l.height,d=l.width;o.top+=c.top-c.marginTop,o.bottom=u+c.top,o.left+=c.left-c.marginLeft,o.right=d+c.left}}var f="number"===typeof(r=r||0);return o.left+=f?r:r.left||0,o.top+=f?r:r.top||0,o.right-=f?r:r.right||0,o.bottom-=f?r:r.bottom||0,o}function ia(e){return e.width*e.height}function oa(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=na(r,n,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(s).map((function(e){return Jo({key:e},s[e],{area:ia(s[e])})})).sort((function(e,t){return t.area-e.area})),l=c.filter((function(e){var t=e.width,n=e.height;return t>=r.clientWidth&&n>=r.clientHeight})),u=l.length>0?l[0].key:c[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function aa(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return ea(r,n?ra(t):qo(t,jo(r)),n)}function sa(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),r=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),n=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+n,height:e.offsetHeight+r}}function ca(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function la(e,t,r){r=r.split("-")[0];var n=sa(e),i={width:n.width,height:n.height},o=-1!==["right","left"].indexOf(r),a=o?"top":"left",s=o?"left":"top",c=o?"height":"width",l=o?"width":"height";return i[a]=t[a]+t[c]/2-n[c]/2,i[s]=r===s?t[s]-n[l]:t[ca(s)],i}function ua(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function da(e,t,r){return(void 0===r?e:e.slice(0,function(e,t,r){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===r}));var n=ua(e,(function(e){return e[t]===r}));return e.indexOf(n)}(e,"name",r))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=e.function||e.fn;e.enabled&&Ro(r)&&(t.offsets.popper=Xo(t.offsets.popper),t.offsets.reference=Xo(t.offsets.reference),t=r(t,e))})),t}function fa(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=aa(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=oa(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=la(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=da(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function ha(e,t){return e.some((function(e){var r=e.name;return e.enabled&&r===t}))}function pa(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n1&&void 0!==arguments[1]&&arguments[1],r=Aa.indexOf(e),n=Aa.slice(r+1).concat(Aa.slice(0,r));return t?n.reverse():n}var Ca={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Ia(e,t,r,n){var i=[0,0],o=-1!==["right","left"].indexOf(n),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(ua(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return l=l.map((function(e,n){var i=(1===n?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,r,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){return Xo("%p"===a?r:n)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,r)}))})),l.forEach((function(e,t){e.forEach((function(r,n){xa(r)&&(i[t]+=r*("-"===e[n-1]?-1:1))}))})),i}var Ta={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(r),c=s?"left":"top",l=s?"width":"height",u={start:Yo({},c,o[c]),end:Yo({},c,o[c]+o[l]-a[l])};e.offsets.popper=Jo({},a,u[n])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var r=t.offset,n=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=n.split("-")[0],c=void 0;return c=xa(+r)?[+r,0]:Ia(r,o,a,s),"left"===s?(o.top+=c[0],o.left-=c[1]):"right"===s?(o.top+=c[0],o.left+=c[1]):"top"===s?(o.left+=c[0],o.top-=c[1]):"bottom"===s&&(o.left+=c[0],o.top+=c[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var r=t.boundariesElement||zo(e.instance.popper);e.instance.reference===r&&(r=zo(r));var n=pa("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[n];i.top="",i.left="",i[n]="";var c=na(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);i.top=o,i.left=a,i[n]=s,t.boundaries=c;var l=t.priority,u=e.offsets.popper,d={primary:function(e){var r=u[e];return u[e]c[e]&&!t.escapeWithReference&&(n=Math.min(u[r],c[e]-("right"===e?u.width:u.height))),Yo({},r,n)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=Jo({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,r=t.popper,n=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",c=a?"left":"top",l=a?"width":"height";return r[s]o(n[s])&&(e.offsets.popper[c]=o(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var r;if(!ka(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"===typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,c=-1!==["left","right"].indexOf(i),l=c?"height":"width",u=c?"Top":"Left",d=u.toLowerCase(),f=c?"left":"top",h=c?"bottom":"right",p=sa(n)[l];s[h]-pa[h]&&(e.offsets.popper[d]+=s[d]+p-a[h]),e.offsets.popper=Xo(e.offsets.popper);var m=s[d]+s[l]/2-p/2,g=No(e.instance.popper),v=parseFloat(g["margin"+u]),y=parseFloat(g["border"+u+"Width"]),b=m-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(a[l]-p,b),0),e.arrowElement=n,e.offsets.arrow=(Yo(r={},d,Math.round(b)),Yo(r,f,""),r),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(ha(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var r=na(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],i=ca(n),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Ca.FLIP:a=[n,i];break;case Ca.CLOCKWISE:a=Ma(n);break;case Ca.COUNTERCLOCKWISE:a=Ma(n,!0);break;default:a=t.behavior}return a.forEach((function(s,c){if(n!==s||a.length===c+1)return e;n=e.placement.split("-")[0],i=ca(n);var l=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="left"===n&&d(l.right)>d(u.left)||"right"===n&&d(l.left)d(u.top)||"bottom"===n&&d(l.top)d(r.right),m=d(l.top)d(r.bottom),v="left"===n&&h||"right"===n&&p||"top"===n&&m||"bottom"===n&&g,y=-1!==["top","bottom"].indexOf(n),b=!!t.flipVariations&&(y&&"start"===o&&h||y&&"end"===o&&p||!y&&"start"===o&&m||!y&&"end"===o&&g),w=!!t.flipVariationsByContent&&(y&&"start"===o&&p||y&&"end"===o&&h||!y&&"start"===o&&g||!y&&"end"===o&&m),x=b||w;(f||v||x)&&(e.flipped=!0,(f||v)&&(n=a[c+1]),x&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=n+(o?"-"+o:""),e.offsets.popper=Jo({},e.offsets.popper,la(e.instance.popper,e.offsets.reference,e.placement)),e=da(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,i=n.popper,o=n.reference,a=-1!==["left","right"].indexOf(r),s=-1===["top","left"].indexOf(r);return i[a?"left":"top"]=o[r]-(s?i[a?"width":"height"]:0),e.placement=ca(t),e.offsets.popper=Xo(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!ka(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=ua(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomr.right||t.top>r.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};Ko(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=Oo(this.update.bind(this)),this.options=Jo({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(Jo({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){n.options.modifiers[t]=Jo({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return Jo({name:e},n.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&Ro(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return Go(e,[{key:"update",value:function(){return fa.call(this)}},{key:"destroy",value:function(){return ma.call(this)}},{key:"enableEventListeners",value:function(){return ba.call(this)}},{key:"disableEventListeners",value:function(){return wa.call(this)}}]),e}();Oa.Utils=("undefined"!==typeof window?window:r.g).PopperUtils,Oa.placements=Sa,Oa.Defaults=Pa;const Ra=Oa;function Na(e){return"function"===typeof e?e():e}var Ba="undefined"!==typeof window?R.useLayoutEffect:R.useEffect,La={},ja=R.forwardRef((function(e,t){var r=e.anchorEl,n=e.children,i=e.container,o=e.disablePortal,a=void 0!==o&&o,s=e.keepMounted,c=void 0!==s&&s,l=e.modifiers,u=e.open,d=e.placement,f=void 0===d?"bottom":d,h=e.popperOptions,p=void 0===h?La:h,m=e.popperRef,g=e.style,v=e.transition,y=void 0!==v&&v,b=(0,O.Z)(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),w=R.useRef(null),x=(0,Oe.Z)(w,t),_=R.useRef(null),E=(0,Oe.Z)(_,m),k=R.useRef(E);Ba((function(){k.current=E}),[E]),R.useImperativeHandle(m,(function(){return _.current}),[]);var S=R.useState(!0),A=S[0],M=S[1],C=function(e,t){if("ltr"===(t&&t.direction||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(f,(0,H.Z)()),I=R.useState(C),T=I[0],N=I[1];R.useEffect((function(){_.current&&_.current.update()}));var B=R.useCallback((function(){if(w.current&&r&&u){_.current&&(_.current.destroy(),k.current(null));var e=function(e){N(e.placement)},t=(Na(r),new Ra(Na(r),w.current,(0,P.Z)({placement:C},p,{modifiers:(0,P.Z)({},a?{}:{preventOverflow:{boundariesElement:"window"}},l,p.modifiers),onCreate:(0,wr.Z)(e,p.onCreate),onUpdate:(0,wr.Z)(e,p.onUpdate)})));k.current(t)}}),[r,a,l,u,C,p]),L=R.useCallback((function(e){(0,vr.Z)(x,e),B()}),[x,B]),j=function(){_.current&&(_.current.destroy(),k.current(null))};if(R.useEffect((function(){return function(){j()}}),[]),R.useEffect((function(){u||y||j()}),[u,y]),!c&&!u&&(!y||A))return null;var D={placement:T};return y&&(D.TransitionProps={in:u,onEnter:function(){M(!1)},onExited:function(){M(!0),j()}}),R.createElement(br,{disablePortal:a,container:i},R.createElement("div",(0,P.Z)({ref:L,role:"tooltip"},b,{style:(0,P.Z)({position:"fixed",top:0,left:0,display:u||!c||y?null:"none"},g)}),"function"===typeof n?n(D):n))}));const Da=ja,Fa=(0,Ae.Z)(R.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),Ua=(0,Ae.Z)(R.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");const za=(0,q.Z)((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,r=e.classes,n=e.fontSize;return R.createElement("div",{className:(0,N.Z)(r.root,t&&r.checked)},R.createElement(Fa,{fontSize:n}),R.createElement(Ua,{fontSize:n,className:r.layer}))}));const Za=R.createContext();function qa(){return R.useContext(Za)}var Ha=R.createElement(za,{checked:!0}),Va=R.createElement(za,null),Wa=R.forwardRef((function(e,t){var r=e.checked,n=e.classes,i=e.color,o=void 0===i?"secondary":i,a=e.name,s=e.onChange,c=e.size,l=void 0===c?"medium":c,u=(0,O.Z)(e,["checked","classes","color","name","onChange","size"]),d=qa(),f=r,h=(0,wr.Z)(s,d&&d.onChange),p=a;return d&&("undefined"===typeof f&&(f=d.value===e.value),"undefined"===typeof p&&(p=d.name)),R.createElement(Kt,(0,P.Z)({color:o,type:"radio",icon:R.cloneElement(Va,{fontSize:"small"===l?"small":"medium"}),checkedIcon:R.cloneElement(Ha,{fontSize:"small"===l?"small":"medium"}),classes:{root:(0,N.Z)(n.root,n["color".concat((0,Ee.Z)(o))]),checked:n.checked,disabled:n.disabled},name:p,checked:f,onChange:h,ref:t},u))}));const $a=(0,q.Z)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,k.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,k.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(Wa);var Ka=r(38162);const Ga=R.forwardRef((function(e,t){var r=e.actions,n=e.children,i=e.name,o=e.value,a=e.onChange,s=(0,O.Z)(e,["actions","children","name","value","onChange"]),c=R.useRef(null),l=(0,fe.Z)({controlled:o,default:e.defaultValue,name:"RadioGroup"}),u=(0,se.Z)(l,2),d=u[0],f=u[1];R.useImperativeHandle(r,(function(){return{focus:function(){var e=c.current.querySelector("input:not(:disabled):checked");e||(e=c.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var h=(0,Oe.Z)(t,c),p=(0,Ka.Z)(i);return R.createElement(Za.Provider,{value:{name:p,onChange:function(e){f(e.target.value),a&&a(e,e.target.value)},value:d}},R.createElement(Bn,(0,P.Z)({role:"radiogroup",ref:h},s),n))}));var Ya=r(80374);var Ja=r(7209),Xa=r(14771);function Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qa(e)}function es(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Qa(e);if(t){var i=Qa(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===(0,Ja.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,Xa.Z)(e)}(this,r)}}const ts=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,Ya.Z)(e,t)}(r,e);var t=es(r);function r(){return G(this,r),t.apply(this,arguments)}return(0,Y.Z)(r,[{key:"componentDidMount",value:function(){this.ref=pr.findDOMNode(this),(0,vr.Z)(this.props.rootRef,this.ref)}},{key:"componentDidUpdate",value:function(e){var t=pr.findDOMNode(this);e.rootRef===this.props.rootRef&&this.ref===t||(e.rootRef!==this.props.rootRef&&(0,vr.Z)(e.rootRef,null),this.ref=t,(0,vr.Z)(this.props.rootRef,this.ref))}},{key:"componentWillUnmount",value:function(){this.ref=null,(0,vr.Z)(this.props.rootRef,null)}},{key:"render",value:function(){return this.props.children}}]),r}(R.Component);var rs=r(11173);function ns(e,t){return"object"===(0,Ja.Z)(t)&&null!==t?e===t:String(e)===String(t)}var is=R.forwardRef((function(e,t){var r=e["aria-label"],n=e.autoFocus,i=e.autoWidth,o=e.children,a=e.classes,s=e.className,c=e.defaultValue,l=e.disabled,u=e.displayEmpty,d=e.IconComponent,f=e.inputRef,h=e.labelId,p=e.MenuProps,m=void 0===p?{}:p,g=e.multiple,v=e.name,y=e.onBlur,b=e.onChange,w=e.onClose,x=e.onFocus,_=e.onOpen,E=e.open,k=e.readOnly,S=e.renderValue,A=e.SelectDisplayProps,M=void 0===A?{}:A,C=e.tabIndex,I=(e.type,e.value),T=e.variant,B=void 0===T?"standard":T,L=(0,O.Z)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),j=(0,fe.Z)({controlled:I,default:c,name:"Select"}),D=(0,se.Z)(j,2),F=D[0],U=D[1],z=R.useRef(null),Z=R.useState(null),q=Z[0],H=Z[1],V=R.useRef(null!=E).current,W=R.useState(),$=W[0],K=W[1],G=R.useState(!1),Y=G[0],J=G[1],X=(0,Oe.Z)(t,f);R.useImperativeHandle(X,(function(){return{focus:function(){q.focus()},node:z.current,value:F}}),[q,F]),R.useEffect((function(){n&&q&&q.focus()}),[n,q]),R.useEffect((function(){if(q){var e=(0,gr.Z)(q).getElementById(h);if(e){var t=function(){getSelection().isCollapsed&&q.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[h,q]);var Q,ee,te=function(e,t){e?_&&_(t):w&&w(t),V||(K(i?null:q.clientWidth),J(e))},re=R.Children.toArray(o),ne=function(e){return function(t){var r;if(g||te(!1,t),g){r=Array.isArray(F)?F.slice():[];var n=F.indexOf(e.props.value);-1===n?r.push(e.props.value):r.splice(n,1)}else r=e.props.value;e.props.onClick&&e.props.onClick(t),F!==r&&(U(r),b&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:r,name:v}}),b(t,e)))}},ie=null!==q&&(V?E:Y);delete L["aria-invalid"];var oe=[],ae=!1;(En({value:F})||u)&&(S?Q=S(F):ae=!0);var ce=re.map((function(e){if(!R.isValidElement(e))return null;var t;if(g){if(!Array.isArray(F))throw new Error((0,pn.Z)(2));(t=F.some((function(t){return ns(t,e.props.value)})))&&ae&&oe.push(e.props.children)}else(t=ns(F,e.props.value))&&ae&&(ee=e.props.children);return t&&!0,R.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ne(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ae&&(Q=g?oe.join(", "):ee);var le,ue=$;!i&&V&&q&&(ue=q.clientWidth),le="undefined"!==typeof C?C:l?null:0;var de=M.id||(v?"mui-component-select-".concat(v):void 0);return R.createElement(R.Fragment,null,R.createElement("div",(0,P.Z)({className:(0,N.Z)(a.root,a.select,a.selectMenu,a[B],s,l&&a.disabled),ref:H,tabIndex:le,role:"button","aria-disabled":l?"true":void 0,"aria-expanded":ie?"true":void 0,"aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[h,de].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!k){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),te(!0,e))}},onMouseDown:l||k?null:function(e){0===e.button&&(e.preventDefault(),q.focus(),te(!0,e))},onBlur:function(e){!ie&&y&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:F,name:v}}),y(e))},onFocus:x},M,{id:de}),function(e){return null==e||"string"===typeof e&&!e.trim()}(Q)?R.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):Q),R.createElement("input",(0,P.Z)({value:Array.isArray(F)?F.join(","):F,name:v,ref:z,"aria-hidden":!0,onChange:function(e){var t=re.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var r=re[t];U(r.props.value),b&&b(e,r)}},tabIndex:-1,className:a.nativeInput,autoFocus:n},L)),R.createElement(d,{className:(0,N.Z)(a.icon,a["icon".concat((0,Ee.Z)(B))],ie&&a.iconOpen,l&&a.disabled)}),R.createElement(ho,(0,P.Z)({id:"menu-".concat(v||""),anchorEl:q,open:ie,onClose:function(e){te(!1,e)}},m,{MenuListProps:(0,P.Z)({"aria-labelledby":h,role:"listbox",disableListWrap:!0},m.MenuListProps),PaperProps:(0,P.Z)({},m.PaperProps,{style:(0,P.Z)({minWidth:ue},null!=m.PaperProps?m.PaperProps.style:null)})}),ce))}));const os=is;var as=wo,ss=R.createElement(Si,null),cs=R.createElement(Cn,null),ls=R.forwardRef((function e(t,r){var n=t.autoWidth,i=void 0!==n&&n,o=t.children,a=t.classes,s=t.displayEmpty,c=void 0!==s&&s,l=t.IconComponent,u=void 0===l?bo:l,d=t.id,f=t.input,h=t.inputProps,p=t.label,m=t.labelId,g=t.labelWidth,v=void 0===g?0:g,y=t.MenuProps,b=t.multiple,w=void 0!==b&&b,x=t.native,_=void 0!==x&&x,E=t.onClose,k=t.onOpen,S=t.open,A=t.renderValue,M=t.SelectDisplayProps,C=t.variant,I=void 0===C?"standard":C,T=(0,O.Z)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),N=_?yo:os,B=mn({props:t,muiFormControl:Wt(),states:["variant"]}).variant||I,L=f||{standard:ss,outlined:R.createElement(Io,{label:p,labelWidth:v}),filled:cs}[B];return R.cloneElement(L,(0,P.Z)({inputComponent:N,inputProps:(0,P.Z)({children:o,IconComponent:u,variant:B,type:void 0,multiple:w},_?{id:d}:{autoWidth:i,displayEmpty:c,labelId:m,MenuProps:y,onClose:E,onOpen:k,open:S,renderValue:A,SelectDisplayProps:(0,P.Z)({id:d},M)},h,{classes:h?(0,rs.Z)({baseClasses:a,newClasses:h.classes,Component:e}):a},f?f.props.inputProps:{}),ref:r},T))}));ls.muiName="Select";const us=(0,q.Z)(as,{name:"MuiSelect"})(ls);const ds=(0,q.Z)((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:(0,P.Z)({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,r=e.classes,n=e.className,i=e.open,o=e.value,a=e.valueLabelDisplay;return"off"===a?t:R.cloneElement(t,{className:(0,N.Z)(t.props.className,(i||"on"===a)&&r.open,r.thumb)},R.createElement("span",{className:(0,N.Z)(r.offset,n)},R.createElement("span",{className:r.circle},R.createElement("span",{className:r.label},o))))}));function fs(e,t){return e-t}function hs(e,t,r){return Math.min(Math.max(t,e),r)}function ps(e,t){return e.reduce((function(e,r,n){var i=Math.abs(t-r);return null===e||i0&&ue.some((function(e){return e.label}))&&o.marked,!1===F&&o.trackFalse,"vertical"===M&&o.vertical,"inverted"===F&&o.trackInverted),onMouseDown:Le},K),R.createElement("span",{className:o.rail}),R.createElement("span",{className:o.track,style:Fe}),R.createElement("input",{value:le.join(","),name:_,type:"hidden"}),ue.map((function(e,t){var r,n=gs(e.value,x,b),i=ws[Te].offset(n);return r=!1===F?-1!==le.indexOf(e.value):"normal"===F&&(ce?e.value>=le[0]&&e.value<=le[le.length-1]:e.value<=le[0])||"inverted"===F&&(ce?e.value<=le[0]||e.value>=le[le.length-1]:e.value>=le[0]),R.createElement(R.Fragment,{key:e.value},R.createElement("span",{style:i,"data-index":t,className:(0,N.Z)(o.mark,r&&o.markActive)}),null!=e.label?R.createElement("span",{"aria-hidden":!0,"data-index":t,style:i,className:(0,N.Z)(o.markLabel,r&&o.markLabelActive)},e.label):null)})),le.map((function(e,t){var a=gs(e,x,b),s=ws[Te].offset(a);return R.createElement(q,{key:t,valueLabelFormat:$,valueLabelDisplay:V,className:o.valueLabel,value:"function"===typeof $?$(I(e),t):$,index:t,open:te===t||X===t||"on"===V,disabled:h},R.createElement(j,{className:(0,N.Z)(o.thumb,o["thumbColor".concat((0,Ee.Z)(c))],X===t&&o.active,h&&o.disabled,ve===t&&o.focusVisible),tabIndex:h?null:0,role:"slider",style:s,"data-index":t,"aria-label":p?p(t):r,"aria-labelledby":n,"aria-orientation":M,"aria-valuemax":I(b),"aria-valuemin":I(x),"aria-valuenow":I(e),"aria-valuetext":m?m(I(e),t):i,onKeyDown:Ce,onFocus:_e,onBlur:ke,onMouseOver:Se,onMouseLeave:Ae}))})))}));const Es=(0,q.Z)((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?(0,k.$n)(e.palette.primary.main,.62):(0,k._j)(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat((0,k.Fq)(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat((0,k.Fq)(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat((0,k.Fq)(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat((0,k.Fq)(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:(0,P.Z)({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(_s);var ks=R.forwardRef((function(e,t){var r=e.action,n=e.classes,i=e.className,o=e.message,a=e.role,s=void 0===a?"alert":a,c=(0,O.Z)(e,["action","classes","className","message","role"]);return R.createElement(ue,(0,P.Z)({role:s,square:!0,elevation:6,className:(0,N.Z)(n.root,i),ref:t},c),R.createElement("div",{className:n.message},o),r?R.createElement("div",{className:n.action},r):null)}));const Ss=(0,q.Z)((function(e){var t="light"===e.palette.type?.8:.98,r=(0,k._4)(e.palette.background.default,t);return{root:(0,P.Z)({},e.typography.body2,(0,Je.Z)({color:e.palette.getContrastText(r),backgroundColor:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(ks);var As=R.forwardRef((function(e,t){var r=e.action,n=e.anchorOrigin,i=(n=void 0===n?{vertical:"bottom",horizontal:"center"}:n).vertical,o=n.horizontal,a=e.autoHideDuration,s=void 0===a?null:a,c=e.children,l=e.classes,u=e.className,d=e.ClickAwayListenerProps,f=e.ContentProps,h=e.disableWindowBlurListener,p=void 0!==h&&h,m=e.message,g=e.onClose,v=e.onEnter,y=e.onEntered,b=e.onEntering,w=e.onExit,x=e.onExited,_=e.onExiting,E=e.onMouseEnter,k=e.onMouseLeave,S=e.open,A=e.resumeHideDuration,M=e.TransitionComponent,C=void 0===M?ri:M,I=e.transitionDuration,T=void 0===I?{enter:z.x9.enteringScreen,exit:z.x9.leavingScreen}:I,B=e.TransitionProps,L=(0,O.Z)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),j=R.useRef(),D=R.useState(!0),F=D[0],U=D[1],Z=(0,xr.Z)((function(){g&&g.apply(void 0,arguments)})),q=(0,xr.Z)((function(e){g&&null!=e&&(clearTimeout(j.current),j.current=setTimeout((function(){Z(null,"timeout")}),e))}));R.useEffect((function(){return S&&q(s),function(){clearTimeout(j.current)}}),[S,s,q]);var H=function(){clearTimeout(j.current)},V=R.useCallback((function(){null!=s&&q(null!=A?A:.5*s)}),[s,A,q]);return R.useEffect((function(){if(!p&&S)return window.addEventListener("focus",V),window.addEventListener("blur",H),function(){window.removeEventListener("focus",V),window.removeEventListener("blur",H)}}),[p,V,S]),!S&&F?null:R.createElement(ur.Z,(0,P.Z)({onClickAway:function(e){g&&g(e,"clickaway")}},d),R.createElement("div",(0,P.Z)({className:(0,N.Z)(l.root,l["anchorOrigin".concat((0,Ee.Z)(i)).concat((0,Ee.Z)(o))],u),onMouseEnter:function(e){E&&E(e),H()},onMouseLeave:function(e){k&&k(e),V()},ref:t},L),R.createElement(C,(0,P.Z)({appear:!0,in:S,onEnter:(0,wr.Z)((function(){U(!1)}),v),onEntered:y,onEntering:b,onExit:w,onExited:(0,wr.Z)((function(){U(!0)}),x),onExiting:_,timeout:T,direction:"top"===i?"down":"up"},B),c||R.createElement(Ss,(0,P.Z)({message:m,action:r},f)))))}));const Ms=(0,q.Z)((function(e){var t={top:8},r={bottom:8},n={justifyContent:"flex-end"},i={justifyContent:"flex-start"},o={top:24},a={bottom:24},s={right:24},c={left:24},l={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:(0,P.Z)({},t,(0,Je.Z)({},e.breakpoints.up("sm"),(0,P.Z)({},o,l))),anchorOriginBottomCenter:(0,P.Z)({},r,(0,Je.Z)({},e.breakpoints.up("sm"),(0,P.Z)({},a,l))),anchorOriginTopRight:(0,P.Z)({},t,n,(0,Je.Z)({},e.breakpoints.up("sm"),(0,P.Z)({left:"auto"},o,s))),anchorOriginBottomRight:(0,P.Z)({},r,n,(0,Je.Z)({},e.breakpoints.up("sm"),(0,P.Z)({left:"auto"},a,s))),anchorOriginTopLeft:(0,P.Z)({},t,i,(0,Je.Z)({},e.breakpoints.up("sm"),(0,P.Z)({right:"auto"},o,c))),anchorOriginBottomLeft:(0,P.Z)({},r,i,(0,Je.Z)({},e.breakpoints.up("sm"),(0,P.Z)({right:"auto"},a,c)))}}),{flip:!1,name:"MuiSnackbar"})(As);var Cs=R.forwardRef((function(e,t){var r=e.active,n=void 0!==r&&r,i=e.alternativeLabel,o=e.children,a=e.classes,s=e.className,c=e.completed,l=void 0!==c&&c,u=e.connector,d=e.disabled,f=void 0!==d&&d,h=e.expanded,p=void 0!==h&&h,m=e.index,g=e.last,v=e.orientation,y=(0,O.Z)(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","expanded","index","last","orientation"]),b=u?R.cloneElement(u,{orientation:v,alternativeLabel:i,index:m,active:n,completed:l,disabled:f}):null,w=R.createElement("div",(0,P.Z)({className:(0,N.Z)(a.root,a[v],s,i&&a.alternativeLabel,l&&a.completed),ref:t},y),b&&i&&0!==m?b:null,R.Children.map(o,(function(e){return R.isValidElement(e)?R.cloneElement(e,(0,P.Z)({active:n,alternativeLabel:i,completed:l,disabled:f,expanded:p,last:g,icon:m+1,orientation:v},e.props)):null})));return b&&!i&&0!==m?R.createElement(R.Fragment,null,b,w):w}));const Is=(0,q.Z)({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(Cs),Ts=(0,Ae.Z)(R.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),Ps=(0,Ae.Z)(R.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");var Os=r(97012),Rs=R.createElement("circle",{cx:"12",cy:"12",r:"12"}),Ns=R.forwardRef((function(e,t){var r=e.completed,n=void 0!==r&&r,i=e.icon,o=e.active,a=void 0!==o&&o,s=e.error,c=void 0!==s&&s,l=e.classes;if("number"===typeof i||"string"===typeof i){var u=(0,N.Z)(l.root,a&&l.active,c&&l.error,n&&l.completed);return c?R.createElement(Ps,{className:u,ref:t}):n?R.createElement(Ts,{className:u,ref:t}):R.createElement(Os.Z,{className:u,ref:t},Rs,R.createElement("text",{className:l.text,x:"12",y:"16",textAnchor:"middle"},i))}return i}));const Bs=(0,q.Z)((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$completed":{color:e.palette.primary.main},"&$active":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(Ns);var Ls=R.forwardRef((function(e,t){var r=e.active,n=void 0!==r&&r,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,c=e.className,l=e.completed,u=void 0!==l&&l,d=e.disabled,f=void 0!==d&&d,h=e.error,p=void 0!==h&&h,m=(e.expanded,e.icon),g=(e.last,e.optional),v=e.orientation,y=void 0===v?"horizontal":v,b=e.StepIconComponent,w=e.StepIconProps,x=(0,O.Z)(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","expanded","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),_=b;return m&&!_&&(_=Bs),R.createElement("span",(0,P.Z)({className:(0,N.Z)(s.root,s[y],c,f&&s.disabled,o&&s.alternativeLabel,p&&s.error),ref:t},x),m||_?R.createElement("span",{className:(0,N.Z)(s.iconContainer,o&&s.alternativeLabel)},R.createElement(_,(0,P.Z)({completed:u,active:n,error:p,icon:m},w))):null,R.createElement("span",{className:s.labelContainer},a?R.createElement(xt.Z,{variant:"body2",component:"span",display:"block",className:(0,N.Z)(s.label,o&&s.alternativeLabel,u&&s.completed,n&&s.active,p&&s.error)},a):null,g))}));Ls.muiName="StepLabel";const js=(0,q.Z)((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(Ls);var Ds=R.forwardRef((function(e,t){var r=e.active,n=e.alternativeLabel,i=e.children,o=e.classes,a=e.className,s=e.completed,c=e.disabled,l=(e.expanded,e.icon),u=(e.last,e.optional),d=e.orientation,f=(0,O.Z)(e,["active","alternativeLabel","children","classes","className","completed","disabled","expanded","icon","last","optional","orientation"]),h={active:r,alternativeLabel:n,completed:s,disabled:c,icon:l,optional:u,orientation:d},p=(0,In.Z)(i,["StepLabel"])?R.cloneElement(i,h):R.createElement(js,h,i);return R.createElement(be.Z,(0,P.Z)({focusRipple:!0,disabled:c,TouchRippleProps:{className:o.touchRipple},className:(0,N.Z)(o.root,o[d],a),ref:t},f),p)}));const Fs=(0,q.Z)({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(Ds);var Us=R.forwardRef((function(e,t){var r=e.active,n=e.alternativeLabel,i=void 0!==n&&n,o=e.classes,a=e.className,s=e.completed,c=e.disabled,l=(e.index,e.orientation),u=void 0===l?"horizontal":l,d=(0,O.Z)(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return R.createElement("div",(0,P.Z)({className:(0,N.Z)(o.root,o[u],a,i&&o.alternativeLabel,r&&o.active,s&&o.completed,c&&o.disabled),ref:t},d),R.createElement("span",{className:(0,N.Z)(o.line,{horizontal:o.lineHorizontal,vertical:o.lineVertical}[u])}))}));const zs=(0,q.Z)((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(Us);var Zs=R.forwardRef((function(e,t){var r=e.active,n=(e.alternativeLabel,e.children),i=e.classes,o=e.className,a=(e.completed,e.expanded),s=e.last,c=(e.optional,e.orientation,e.TransitionComponent),l=void 0===c?ce.Z:c,u=e.transitionDuration,d=void 0===u?"auto":u,f=e.TransitionProps,h=(0,O.Z)(e,["active","alternativeLabel","children","classes","className","completed","expanded","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]);var p=d;return"auto"!==d||l.muiSupportAuto||(p=void 0),R.createElement("div",(0,P.Z)({className:(0,N.Z)(i.root,o,s&&i.last),ref:t},h),R.createElement(l,(0,P.Z)({in:r||a,className:i.transition,timeout:p,unmountOnExit:!0},f),n))}));const qs=(0,q.Z)((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(Zs);var Hs=R.createElement(zs,null),Vs=R.forwardRef((function(e,t){var r=e.activeStep,n=void 0===r?0:r,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,c=e.className,l=e.connector,u=void 0===l?Hs:l,d=e.nonLinear,f=void 0!==d&&d,h=e.orientation,p=void 0===h?"horizontal":h,m=(0,O.Z)(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=R.isValidElement(u)?R.cloneElement(u,{orientation:p}):null,v=R.Children.toArray(a),y=v.map((function(e,t){var r={index:t,active:!1,completed:!1,disabled:!1};return n===t?r.active=!0:!f&&n>t?r.completed=!0:!f&&n1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,i=void 0===n?null:n,a=t.changeTransition,c=void 0===a||a,l=Xr(r,o),u=-1!==["right","bottom"].indexOf(l)?1:-1,d=Jr(o),h=d?"translate(".concat(u*e,"px, 0)"):"translate(0, ".concat(u*e,"px)"),p=q.current.style;p.webkitTransform=h,p.transform=h;var m="";if(i&&(m=r.transitions.create("all",(0,Pe.C)({timeout:I},{mode:i}))),c&&(p.webkitTransition=m,p.transition=m),!s&&!f){var g=z.current.style;g.opacity=1-e/Xs(d,q.current),c&&(g.webkitTransition=m,g.transition=m)}}),[o,s,f,r,I]),$=(0,xr.Z)((function(e){if(H.current)if(Gs=null,H.current=!1,D(!1),F.current.isSwiping){F.current.isSwiping=null;var t,n=Xr(r,o),i=Jr(o);t=i?Ys(n,e.changedTouches):Js(n,e.changedTouches);var a=i?F.current.startX:F.current.startY,s=Xs(i,q.current),c=Qs(t,a,_,s),l=c/s;Math.abs(F.current.velocity)>g&&(V.current=1e3*Math.abs((s-c)/F.current.velocity)),_?F.current.velocity>g||l>p?w():W(0,{mode:"exit"}):F.current.velocity<-g||1-l>p?x():W(Xs(i,q.current),{mode:"enter"})}else F.current.isSwiping=null})),K=(0,xr.Z)((function(e){if(q.current&&H.current&&(null==Gs||Gs===F.current)){var t=Xr(r,o),n=Jr(o),i=Ys(t,e.touches),a=Js(t,e.touches);if(_&&q.current.contains(e.target)&&null==Gs){var s=function(e,t){for(var r=[];e&&e!==t;){var n=window.getComputedStyle(e);"absolute"===n.getPropertyValue("position")||"hidden"===n.getPropertyValue("overflow-x")?r=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&r.push(e),e=e.parentElement}return r}(e.target,q.current),c=function(e){var t=e.domTreeShapes,r=e.start,n=e.current,i=e.anchor,o={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=n>=r;"top"!==i&&"left"!==i||(t=!t);var c="left"===i||"right"===i?"x":"y",l=e[o[c]],u=l>0,d=l+e[s[c]]d&&e.cancelable&&e.preventDefault();var f=n?u>d&&u>3:d>u&&d>3;if(!0===f||(n?d>3:u>3)){if(F.current.isSwiping=f,!f)return void $(e);F.current.startX=i,F.current.startY=a,l||_||(n?F.current.startX-=M:F.current.startY-=M)}}if(F.current.isSwiping){var h=Xs(n,q.current),p=n?F.current.startX:F.current.startY;_&&!F.current.paperHit&&(p=Math.min(p,h));var m=Qs(n?i:a,p,_,h);if(_)if(F.current.paperHit)0===m&&(F.current.startX=i,F.current.startY=a);else{if(!(n?iM)return}else if(a>M)return}e.muiHandled=!0,Gs=null,F.current.startX=i,F.current.startY=a,D(!0),!_&&q.current&&W(Xs(n,q.current)+(l?20:-M),{changeTransition:!1}),F.current.velocity=0,F.current.lastTime=null,F.current.lastTranslate=null,F.current.paperHit=!1,H.current=!0}}));R.useEffect((function(){if("temporary"===N){var e=(0,gr.Z)(q.current);return e.addEventListener("touchstart",G),e.addEventListener("touchmove",K,{passive:!1}),e.addEventListener("touchend",$),function(){e.removeEventListener("touchstart",G),e.removeEventListener("touchmove",K,{passive:!1}),e.removeEventListener("touchend",$)}}}),[N,G,K,$]),R.useEffect((function(){return function(){Gs===F.current&&(Gs=null)}}),[]),R.useEffect((function(){_||D(!1)}),[_]);var Y=R.useCallback((function(e){z.current=pr.findDOMNode(e)}),[]);return R.createElement(R.Fragment,null,R.createElement(tn,(0,P.Z)({open:!("temporary"!==N||!j)||_,variant:N,ModalProps:(0,P.Z)({BackdropProps:(0,P.Z)({},y,{ref:Y})},b),PaperProps:(0,P.Z)({},k,{style:(0,P.Z)({pointerEvents:"temporary"!==N||_?"":"none"},k.style),ref:q}),anchor:o,transitionDuration:V.current||I,onClose:w,ref:t},B)),!d&&"temporary"===N&&R.createElement(So,null,R.createElement(Ks,(0,P.Z)({anchor:o,ref:U,width:M},S))))}));const ic=nc;var oc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.color,o=void 0===i?"secondary":i,a=e.edge,s=void 0!==a&&a,c=e.size,l=void 0===c?"medium":c,u=(0,O.Z)(e,["classes","className","color","edge","size"]),d=R.createElement("span",{className:r.thumb});return R.createElement("span",{className:(0,N.Z)(r.root,n,{start:r.edgeStart,end:r.edgeEnd}[s],"small"===l&&r["size".concat((0,Ee.Z)(l))])},R.createElement(Kt,(0,P.Z)({type:"checkbox",icon:d,checkedIcon:d,classes:{root:(0,N.Z)(r.switchBase,r["color".concat((0,Ee.Z)(o))]),input:r.input,checked:r.checked,disabled:r.disabled},ref:t},u)),R.createElement("span",{className:r.track}))}));const ac=(0,q.Z)((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,k.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,k.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(oc);var sc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.disabled,o=void 0!==i&&i,a=e.disableFocusRipple,s=void 0!==a&&a,c=e.fullWidth,l=e.icon,u=e.indicator,d=e.label,f=e.onChange,h=e.onClick,p=e.onFocus,m=e.selected,g=e.selectionFollowsFocus,v=e.textColor,y=void 0===v?"inherit":v,b=e.value,w=e.wrapped,x=void 0!==w&&w,_=(0,O.Z)(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"]);return R.createElement(be.Z,(0,P.Z)({focusRipple:!s,className:(0,N.Z)(r.root,r["textColor".concat((0,Ee.Z)(y))],n,o&&r.disabled,m&&r.selected,d&&l&&r.labelIcon,c&&r.fullWidth,x&&r.wrapped),ref:t,role:"tab","aria-selected":m,disabled:o,onClick:function(e){f&&f(e,b),h&&h(e)},onFocus:function(e){g&&!m&&f&&f(e,b),p&&p(e)},tabIndex:m?0:-1},_),R.createElement("span",{className:r.wrapper},l,d),u)}));const cc=(0,q.Z)((function(e){var t;return{root:(0,P.Z)({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},(0,Je.Z)(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),(0,Je.Z)(t,"overflow","hidden"),(0,Je.Z)(t,"whiteSpace","normal"),(0,Je.Z)(t,"textAlign","center"),(0,Je.Z)(t,e.breakpoints.up("sm"),{minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(sc);const lc=R.createContext();var uc="table",dc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?uc:i,a=e.padding,s=void 0===a?"normal":a,c=e.size,l=void 0===c?"medium":c,u=e.stickyHeader,d=void 0!==u&&u,f=(0,O.Z)(e,["classes","className","component","padding","size","stickyHeader"]),h=R.useMemo((function(){return{padding:s,size:l,stickyHeader:d}}),[s,l,d]);return R.createElement(lc.Provider,{value:h},R.createElement(o,(0,P.Z)({role:o===uc?null:"table",ref:t,className:(0,N.Z)(r.root,n,d&&r.stickyHeader)},f)))}));const fc=(0,q.Z)((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,P.Z)({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(dc);const hc=R.createContext();var pc={variant:"body"},mc="tbody",gc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?mc:i,a=(0,O.Z)(e,["classes","className","component"]);return R.createElement(hc.Provider,{value:pc},R.createElement(o,(0,P.Z)({className:(0,N.Z)(r.root,n),ref:t,role:o===mc?null:"rowgroup"},a)))}));const vc=(0,q.Z)({root:{display:"table-row-group"}},{name:"MuiTableBody"})(gc);var yc=R.forwardRef((function(e,t){var r,n,i=e.align,o=void 0===i?"inherit":i,a=e.classes,s=e.className,c=e.component,l=e.padding,u=e.scope,d=e.size,f=e.sortDirection,h=e.variant,p=(0,O.Z)(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),m=R.useContext(lc),g=R.useContext(hc),v=g&&"head"===g.variant;c?(n=c,r=v?"columnheader":"cell"):n=v?"th":"td";var y=u;!y&&v&&(y="col");var b=l||(m&&m.padding?m.padding:"normal"),w=d||(m&&m.size?m.size:"medium"),x=h||g&&g.variant,_=null;return f&&(_="asc"===f?"ascending":"descending"),R.createElement(n,(0,P.Z)({ref:t,className:(0,N.Z)(a.root,a[x],s,"inherit"!==o&&a["align".concat((0,Ee.Z)(o))],"normal"!==b&&a["padding".concat((0,Ee.Z)(b))],"medium"!==w&&a["size".concat((0,Ee.Z)(w))],"head"===x&&m&&m.stickyHeader&&a.stickyHeader),"aria-sort":_,role:r,scope:y},p))}));const bc=(0,q.Z)((function(e){return{root:(0,P.Z)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?(0,k.$n)((0,k.Fq)(e.palette.divider,1),.88):(0,k._j)((0,k.Fq)(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(yc);var wc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?"div":i,a=(0,O.Z)(e,["classes","className","component"]);return R.createElement(o,(0,P.Z)({ref:t,className:(0,N.Z)(r.root,n)},a))}));const xc=(0,q.Z)({root:{width:"100%",overflowX:"auto"}},{name:"MuiTableContainer"})(wc);var _c={variant:"footer"},Ec="tfoot",kc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?Ec:i,a=(0,O.Z)(e,["classes","className","component"]);return R.createElement(hc.Provider,{value:_c},R.createElement(o,(0,P.Z)({className:(0,N.Z)(r.root,n),ref:t,role:o===Ec?null:"rowgroup"},a)))}));const Sc=(0,q.Z)({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(kc);var Ac={variant:"head"},Mc="thead",Cc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?Mc:i,a=(0,O.Z)(e,["classes","className","component"]);return R.createElement(hc.Provider,{value:Ac},R.createElement(o,(0,P.Z)({className:(0,N.Z)(r.root,n),ref:t,role:o===Mc?null:"rowgroup"},a)))}));const Ic=(0,q.Z)({root:{display:"table-header-group"}},{name:"MuiTableHead"})(Cc);var Tc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?"div":i,a=e.disableGutters,s=void 0!==a&&a,c=e.variant,l=void 0===c?"regular":c,u=(0,O.Z)(e,["classes","className","component","disableGutters","variant"]);return R.createElement(o,(0,P.Z)({className:(0,N.Z)(r.root,r[l],n,!s&&r.gutters),ref:t},u))}));const Pc=(0,q.Z)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:(0,Je.Z)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(Tc),Oc=(0,Ae.Z)(R.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Rc=(0,Ae.Z)(R.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");var Nc=R.createElement(Rc,null),Bc=R.createElement(Oc,null),Lc=R.createElement(Oc,null),jc=R.createElement(Rc,null);const Dc=R.forwardRef((function(e,t){var r=e.backIconButtonProps,n=e.count,i=e.nextIconButtonProps,o=e.onChangePage,a=void 0===o?function(){}:o,s=e.onPageChange,c=void 0===s?function(){}:s,l=e.page,u=e.rowsPerPage,d=(0,O.Z)(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","onPageChange","page","rowsPerPage"]),f=(0,Z.Z)();return R.createElement("div",(0,P.Z)({ref:t},d),R.createElement(we.Z,(0,P.Z)({onClick:function(e){a(e,l-1),c(e,l-1)},disabled:0===l,color:"inherit"},r),"rtl"===f.direction?Nc:Bc),R.createElement(we.Z,(0,P.Z)({onClick:function(e){a(e,l+1),c(e,l+1)},disabled:-1!==n&&l>=Math.ceil(n/u)-1,color:"inherit"},i),"rtl"===f.direction?Lc:jc))}));var Fc=function(e){var t=e.from,r=e.to,n=e.count;return"".concat(t,"-").concat(r," of ").concat(-1!==n?n:"more than ".concat(r))},Uc=[10,25,50,100],zc=R.forwardRef((function(e,t){var r,n=e.ActionsComponent,i=void 0===n?Dc:n,o=e.backIconButtonProps,a=e.backIconButtonText,s=void 0===a?"Previous page":a,c=e.classes,l=e.className,u=e.colSpan,d=e.component,f=void 0===d?bc:d,h=e.count,p=e.labelDisplayedRows,m=void 0===p?Fc:p,g=e.labelRowsPerPage,v=void 0===g?"Rows per page:":g,y=e.nextIconButtonProps,b=e.nextIconButtonText,w=void 0===b?"Next page":b,x=e.onChangePage,_=e.onPageChange,E=e.onChangeRowsPerPage,k=e.onRowsPerPageChange,S=e.page,A=e.rowsPerPage,M=e.rowsPerPageOptions,C=void 0===M?Uc:M,I=e.SelectProps,T=void 0===I?{}:I,B=(0,O.Z)(e,["ActionsComponent","backIconButtonProps","backIconButtonText","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","nextIconButtonText","onChangePage","onPageChange","onChangeRowsPerPage","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps"]),L=E||k;f!==bc&&"td"!==f||(r=u||1e3);var j=(0,Ka.Z)(),D=(0,Ka.Z)(),F=T.native?"option":mo;return R.createElement(f,(0,P.Z)({className:(0,N.Z)(c.root,l),colSpan:r,ref:t},B),R.createElement(Pc,{className:c.toolbar},R.createElement("div",{className:c.spacer}),C.length>1&&R.createElement(xt.Z,{color:"inherit",variant:"body2",className:c.caption,id:D},v),C.length>1&&R.createElement(us,(0,P.Z)({classes:{select:c.select,icon:c.selectIcon},input:R.createElement(An,{className:(0,N.Z)(c.input,c.selectRoot)}),value:A,onChange:L,id:j,labelId:D},T),C.map((function(e){return R.createElement(F,{className:c.menuItem,key:e.value?e.value:e,value:e.value?e.value:e},e.label?e.label:e)}))),R.createElement(xt.Z,{color:"inherit",variant:"body2",className:c.caption},m({from:0===h?0:S*A+1,to:-1!==h?Math.min(h,(S+1)*A):(S+1)*A,count:-1===h?-1:h,page:S})),R.createElement(i,{className:c.actions,backIconButtonProps:(0,P.Z)({title:s,"aria-label":s},o),count:h,nextIconButtonProps:(0,P.Z)({title:w,"aria-label":w},y),onChangePage:x,onPageChange:_,page:S,rowsPerPage:A})))}));const Zc=(0,q.Z)((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),overflow:"auto","&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(zc);var qc=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?"tr":i,a=e.hover,s=void 0!==a&&a,c=e.selected,l=void 0!==c&&c,u=(0,O.Z)(e,["classes","className","component","hover","selected"]),d=R.useContext(hc);return R.createElement(o,(0,P.Z)({ref:t,className:(0,N.Z)(r.root,n,d&&{head:r.head,footer:r.footer}[d.variant],s&&r.hover,l&&r.selected),role:"tr"===o?null:"row"},u))}));const Hc=(0,q.Z)((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:e.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:(0,k.Fq)(e.palette.secondary.main,e.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(qc),Vc=(0,Ae.Z)(R.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");var Wc=R.forwardRef((function(e,t){var r=e.active,n=void 0!==r&&r,i=e.children,o=e.classes,a=e.className,s=e.direction,c=void 0===s?"asc":s,l=e.hideSortIcon,u=void 0!==l&&l,d=e.IconComponent,f=void 0===d?Vc:d,h=(0,O.Z)(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return R.createElement(be.Z,(0,P.Z)({className:(0,N.Z)(o.root,a,n&&o.active),component:"span",disableRipple:!0,ref:t},h),i,u&&!n?null:R.createElement(f,{className:(0,N.Z)(o.icon,o["iconDirection".concat((0,Ee.Z)(c))])}))}));const $c=(0,q.Z)((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:.5}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(Wc);var Kc;function Gc(){if(Kc)return Kc;var e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Kc="reverse",e.scrollLeft>0?Kc="default":(e.scrollLeft=1,0===e.scrollLeft&&(Kc="negative")),document.body.removeChild(e),Kc}function Yc(e,t){var r=e.scrollLeft;if("rtl"!==t)return r;switch(Gc()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}function Jc(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var Xc={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Qc(e){var t=e.onChange,r=(0,O.Z)(e,["onChange"]),n=R.useRef(),i=R.useRef(null),o=function(){n.current=i.current.offsetHeight-i.current.clientHeight};return R.useEffect((function(){var e=(0,gn.Z)((function(){var e=n.current;o(),e!==n.current&&t(n.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),R.useEffect((function(){o(),t(n.current)}),[t]),R.createElement("div",(0,P.Z)({style:Xc,ref:i},r))}var el=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.color,o=e.orientation,a=(0,O.Z)(e,["classes","className","color","orientation"]);return R.createElement("span",(0,P.Z)({className:(0,N.Z)(r.root,r["color".concat((0,Ee.Z)(i))],n,"vertical"===o&&r.vertical),ref:t},a))}));const tl=(0,q.Z)((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(el);var rl=R.createElement(Oc,{fontSize:"small"}),nl=R.createElement(Rc,{fontSize:"small"}),il=R.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.direction,o=e.orientation,a=e.disabled,s=(0,O.Z)(e,["classes","className","direction","orientation","disabled"]);return R.createElement(be.Z,(0,P.Z)({component:"div",className:(0,N.Z)(r.root,n,a&&r.disabled,"vertical"===o&&r.vertical),ref:t,role:null,tabIndex:null},s),"left"===i?rl:nl)}));const ol=(0,q.Z)({root:{width:40,flexShrink:0,opacity:.8,"&$disabled":{opacity:0}},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}},disabled:{}},{name:"MuiTabScrollButton"})(il);var al=R.forwardRef((function(e,t){var r=e["aria-label"],n=e["aria-labelledby"],i=e.action,o=e.centered,a=void 0!==o&&o,s=e.children,c=e.classes,l=e.className,u=e.component,d=void 0===u?"div":u,f=e.indicatorColor,h=void 0===f?"secondary":f,p=e.onChange,m=e.orientation,g=void 0===m?"horizontal":m,v=e.ScrollButtonComponent,y=void 0===v?ol:v,b=e.scrollButtons,w=void 0===b?"auto":b,x=e.selectionFollowsFocus,_=e.TabIndicatorProps,E=void 0===_?{}:_,k=e.TabScrollButtonProps,S=e.textColor,A=void 0===S?"inherit":S,M=e.value,C=e.variant,I=void 0===C?"standard":C,T=(0,O.Z)(e,["aria-label","aria-labelledby","action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant"]),B=(0,Z.Z)(),L="scrollable"===I,j="rtl"===B.direction,D="vertical"===g,F=D?"scrollTop":"scrollLeft",U=D?"top":"left",z=D?"bottom":"right",q=D?"clientHeight":"clientWidth",H=D?"height":"width";var V=R.useState(!1),W=V[0],$=V[1],K=R.useState({}),G=K[0],Y=K[1],J=R.useState({start:!1,end:!1}),X=J[0],Q=J[1],ee=R.useState({overflow:"hidden",marginBottom:null}),te=ee[0],re=ee[1],ne=new Map,ie=R.useRef(null),oe=R.useRef(null),ae=function(){var e,t,r=ie.current;if(r){var n=r.getBoundingClientRect();e={clientWidth:r.clientWidth,scrollLeft:r.scrollLeft,scrollTop:r.scrollTop,scrollLeftNormalized:Yc(r,B.direction),scrollWidth:r.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(r&&!1!==M){var i=oe.current.children;if(i.length>0){var o=i[ne.get(M)];0,t=o?o.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},se=(0,xr.Z)((function(){var e,t=ae(),r=t.tabsMeta,n=t.tabMeta,i=0;if(n&&r)if(D)i=n.top-r.top+r.scrollTop;else{var o=j?r.scrollLeftNormalized+r.clientWidth-r.scrollWidth:r.scrollLeft;i=n.left-r.left+o}var a=(e={},(0,Je.Z)(e,U,i),(0,Je.Z)(e,H,n?n[H]:0),e);if(isNaN(G[U])||isNaN(G[H]))Y(a);else{var s=Math.abs(G[U]-a[U]),c=Math.abs(G[H]-a[H]);(s>=1||c>=1)&&Y(a)}})),ce=function(e){!function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=n.ease,a=void 0===o?Jc:o,s=n.duration,c=void 0===s?300:s,l=null,u=t[e],d=!1,f=function(){d=!0};u===r?i(new Error("Element already at target position")):requestAnimationFrame((function n(o){if(d)i(new Error("Animation cancelled"));else{null===l&&(l=o);var s=Math.min(1,(o-l)/c);t[e]=a(s)*(r-u)+u,s>=1?requestAnimationFrame((function(){i(null)})):requestAnimationFrame(n)}}))}(F,ie.current,e)},le=function(e){var t=ie.current[F];D?t+=e:(t+=e*(j?-1:1),t*=j&&"reverse"===Gc()?-1:1),ce(t)},ue=function(){le(-ie.current[q])},de=function(){le(ie.current[q])},fe=R.useCallback((function(e){re({overflow:null,marginBottom:-e})}),[]),he=(0,xr.Z)((function(){var e=ae(),t=e.tabsMeta,r=e.tabMeta;if(r&&t)if(r[U]t[z]){var i=t[F]+(r[z]-t[z]);ce(i)}})),pe=(0,xr.Z)((function(){if(L&&"off"!==w){var e,t,r=ie.current,n=r.scrollTop,i=r.scrollHeight,o=r.clientHeight,a=r.scrollWidth,s=r.clientWidth;if(D)e=n>1,t=n1,t=j?c>1:c0&&void 0!==arguments[0])||arguments[0];return function(t){var r=i.props;"mouseover"===t.type&&r.onMouseOver&&e&&r.onMouseOver(t),J.current&&"touchstart"!==t.type||(W&&W.removeAttribute("title"),clearTimeout(Q.current),clearTimeout(ee.current),h||fl&&m?(t.persist(),Q.current=setTimeout((function(){le(t)}),fl?m:h)):le(t))}},de=(0,Oi.Z)(),he=de.isFocusVisible,pe=de.onBlurVisible,me=de.ref,ge=R.useState(!1),ve=ge[0],ye=ge[1],be=function(){ve&&(ye(!1),pe())},we=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){W||$(t.currentTarget),he(t)&&(ye(!0),ue()(t));var r=i.props;r.onFocus&&e&&r.onFocus(t)}},xe=function(e){clearTimeout(hl),hl=setTimeout((function(){fl=!1}),800+_),oe(!1),S&&S(e),clearTimeout(X.current),X.current=setTimeout((function(){J.current=!1}),H.transitions.duration.shortest)},_e=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){var r=i.props;"blur"===t.type&&(r.onBlur&&e&&r.onBlur(t),be()),"mouseleave"===t.type&&r.onMouseLeave&&t.currentTarget===W&&r.onMouseLeave(t),clearTimeout(Q.current),clearTimeout(ee.current),t.persist(),ee.current=setTimeout((function(){xe(t)}),_)}},ke=function(e){J.current=!0;var t=i.props;t.onTouchStart&&t.onTouchStart(e)},Se=(0,Oe.Z)($,t),Ae=(0,Oe.Z)(me,Se),Me=R.useCallback((function(e){(0,vr.Z)(Ae,pr.findDOMNode(e))}),[Ae]),Ce=(0,Oe.Z)(i.ref,Me);""===D&&(ae=!1);var Ie=!ae&&!l,Te=(0,P.Z)({"aria-describedby":ae?ce:null,title:Ie&&"string"===typeof D?D:null},q,i.props,{className:(0,N.Z)(q.className,i.props.className),onTouchStart:ke,ref:Ce}),Pe={};d||(Te.onTouchStart=function(e){ke(e),clearTimeout(ee.current),clearTimeout(X.current),clearTimeout(te.current),e.persist(),te.current=setTimeout((function(){ue()(e)}),v)},Te.onTouchEnd=function(e){i.props.onTouchEnd&&i.props.onTouchEnd(e),clearTimeout(te.current),clearTimeout(ee.current),e.persist(),ee.current=setTimeout((function(){xe(e)}),k)}),l||(Te.onMouseOver=ue(),Te.onMouseLeave=_e(),w&&(Pe.onMouseOver=ue(!1),Pe.onMouseLeave=_e(!1))),s||(Te.onFocus=we(),Te.onBlur=_e(),w&&(Pe.onFocus=we(!1),Pe.onBlur=_e(!1)));var Re=R.useMemo((function(){return(0,A.Z)({popperOptions:{modifiers:{arrow:{enabled:Boolean(G),element:G}}}},j)}),[G,j]);return R.createElement(R.Fragment,null,R.cloneElement(i,Te),R.createElement(L,(0,P.Z)({className:(0,N.Z)(o.popper,w&&o.popperInteractive,n&&o.popperArrow),placement:T,anchorEl:W,open:!!W&&ae,id:Te["aria-describedby"],transition:!0},Pe,Re),(function(e){var t=e.placement,r=e.TransitionProps;return R.createElement(U,(0,P.Z)({timeout:H.transitions.duration.shorter},r,z),R.createElement("div",{className:(0,N.Z)(o.tooltip,o["tooltipPlacement".concat((0,Ee.Z)(t.split("-")[0]))],J.current&&o.touch,n&&o.tooltipArrow)},D,n?R.createElement("span",{className:o.arrow,ref:Y}):null))})))}));const ml=(0,q.Z)((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none"},popperInteractive:{pointerEvents:"auto"},popperArrow:{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}},tooltip:{backgroundColor:(0,k.Fq)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(dl(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:(0,k.Fq)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(dl(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:(0,Je.Z)({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:(0,Je.Z)({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:(0,Je.Z)({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:(0,Je.Z)({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip",flip:!1})(pl);function gl(e,t){var r=t.disableHysteresis,n=void 0!==r&&r,i=t.threshold,o=void 0===i?100:i,a=t.target,s=e.current;return a&&(e.current=void 0!==a.pageYOffset?a.pageYOffset:a.scrollTop),!(!n&&void 0!==s&&e.currento}var vl="undefined"!==typeof window?window:null;function yl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getTrigger,r=void 0===t?gl:t,n=e.target,i=void 0===n?vl:n,o=(0,O.Z)(e,["getTrigger","target"]),a=R.useRef(),s=R.useState((function(){return r(a,o)})),c=s[0],l=s[1];return R.useEffect((function(){var e=function(){l(r(a,(0,P.Z)({target:i},o)))};return e(),i.addEventListener("scroll",e),function(){i.removeEventListener("scroll",e)}}),[i,r,JSON.stringify(o)]),c}const bl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=e.breakpoint,n=void 0===r?"sm":r;return ui()((function(e){return R.createElement(t,(0,P.Z)({fullScreen:ci(n,e.width)},e))}))}};var wl={entering:{transform:"none"},entered:{transform:"none"}},xl={enter:z.x9.enteringScreen,exit:z.x9.leavingScreen},_l=R.forwardRef((function(e,t){var r=e.children,n=e.disableStrictModeCompat,i=void 0!==n&&n,o=e.in,a=e.onEnter,s=e.onEntered,c=e.onEntering,l=e.onExit,u=e.onExited,d=e.onExiting,f=e.style,h=e.timeout,p=void 0===h?xl:h,m=e.TransitionComponent,g=void 0===m?Te.ZP:m,v=(0,O.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),y=(0,Z.Z)(),b=y.unstable_strictMode&&!i,w=R.useRef(null),x=(0,Oe.Z)(r.ref,t),_=(0,Oe.Z)(b?w:void 0,x),E=function(e){return function(t,r){if(e){var n=b?[w.current,t]:[t,r],i=(0,se.Z)(n,2),o=i[0],a=i[1];void 0===a?e(o):e(o,a)}}},k=E(c),S=E((function(e,t){(0,Pe.n)(e);var r=(0,Pe.C)({style:f,timeout:p},{mode:"enter"});e.style.webkitTransition=y.transitions.create("transform",r),e.style.transition=y.transitions.create("transform",r),a&&a(e,t)})),A=E(s),M=E(d),C=E((function(e){var t=(0,Pe.C)({style:f,timeout:p},{mode:"exit"});e.style.webkitTransition=y.transitions.create("transform",t),e.style.transition=y.transitions.create("transform",t),l&&l(e)})),I=E(u);return R.createElement(g,(0,P.Z)({appear:!0,in:o,nodeRef:b?w:void 0,onEnter:S,onEntered:A,onEntering:k,onExit:C,onExited:I,onExiting:M,timeout:p},v),(function(e,t){return R.cloneElement(r,(0,P.Z)({style:(0,P.Z)({transform:"scale(0)",visibility:"exited"!==e||o?void 0:"hidden"},wl[e],f,r.props.style),ref:_},t))}))}));const El=_l},19012:(e,t,r)=>{"use strict";r.d(t,{$n:()=>g,Fq:()=>p,H3:()=>d,U1:()=>h,_4:()=>f,_j:()=>m,mi:()=>u,oo:()=>o,tB:()=>c,ve:()=>s,vq:()=>a,wy:()=>l});var n=r(64907);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),r)}function o(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){if(0===e.indexOf("#"))return e;var t=c(e).values;return"#".concat(t.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))}function s(e){var t=(e=c(e)).values,r=t[0],n=t[1]/100,i=t[2]/100,o=n*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),l({type:s,values:u})}function c(e){if(e.type)return e;if("#"===e.charAt(0))return c(o(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error((0,n.Z)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:r,values:i=i.map((function(e){return parseFloat(e)}))}}function l(e){var t=e.type,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function u(e,t){var r=d(e),n=d(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function d(e){var t="hsl"===(e=c(e)).type?c(s(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return d(e)>.5?m(e,t):g(e,t)}function h(e,t){return p(e,t)}function p(e,t){return e=c(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,l(e)}function m(e,t){if(e=c(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return l(e)}function g(e,t){if(e=c(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return l(e)}},48010:(e,t,r)=>{"use strict";r.d(t,{X:()=>o,Z:()=>a});var n=r(17692),i=r(29382),o=["xs","sm","md","lg","xl"];function a(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,a=e.unit,s=void 0===a?"px":a,c=e.step,l=void 0===c?5:c,u=(0,i.Z)(e,["values","unit","step"]);function d(e){var t="number"===typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function f(e,t){var n=o.indexOf(t);return n===o.length-1?d(e):"@media (min-width:".concat("number"===typeof r[e]?r[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==n&&"number"===typeof r[o[n+1]]?r[o[n+1]]:t)-l/100).concat(s,")")}return(0,n.Z)({keys:o,values:r,up:d,down:function(e){var t=o.indexOf(e)+1,n=r[o[t]];return t===o.length?d("xs"):"@media (max-width:".concat(("number"===typeof n&&t>0?n:e)-l/100).concat(s,")")},between:f,only:function(e){return f(e,e)},width:function(e){return r[e]}},u)}},73830:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{Z:()=>n})},77166:(e,t,r)=>{"use strict";r.d(t,{A:()=>j,Z:()=>D});var n=r(29382),i=r(49998),o=r(48010),a=r(20240),s=r(17692);function c(e,t,r){var n;return(0,s.Z)({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,s.Z)({paddingLeft:t(2),paddingRight:t(2)},r,(0,a.Z)({},e.up("sm"),(0,s.Z)({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},(0,a.Z)(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,a.Z)(n,e.up("sm"),{minHeight:64}),n)},r)}var l=r(64907),u=r(65719),d=r(32854),f=r(39410),h=r(13284),p=r(84439),m=r(77286),g=r(58704),v=r(73815),y=r(19012),b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.Z.white,default:d.Z[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:u.Z.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d.Z[800],default:"#303030"},action:{active:u.Z.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function x(e,t,r,n){var i=n.light||n,o=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=(0,y.$n)(e.main,i):"dark"===t&&(e.dark=(0,y._j)(e.main,o)))}function _(e){return Math.round(1e5*e)/1e5}function E(e){return _(e)}var k={textTransform:"uppercase"},S='"Roboto", "Helvetica", "Arial", sans-serif';function A(e,t){var r="function"===typeof t?t(e):t,o=r.fontFamily,a=void 0===o?S:o,c=r.fontSize,l=void 0===c?14:c,u=r.fontWeightLight,d=void 0===u?300:u,f=r.fontWeightRegular,h=void 0===f?400:f,p=r.fontWeightMedium,m=void 0===p?500:p,g=r.fontWeightBold,v=void 0===g?700:g,y=r.htmlFontSize,b=void 0===y?16:y,w=r.allVariants,x=r.pxToRem,A=(0,n.Z)(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var M=l/14,C=x||function(e){return"".concat(e/b*M,"rem")},I=function(e,t,r,n,i){return(0,s.Z)({fontFamily:a,fontWeight:e,fontSize:C(t),lineHeight:r},a===S?{letterSpacing:"".concat(_(n/t),"em")}:{},i,w)},T={h1:I(d,96,1.167,-1.5),h2:I(d,60,1.2,-.5),h3:I(h,48,1.167,0),h4:I(h,34,1.235,.25),h5:I(h,24,1.334,0),h6:I(m,20,1.6,.15),subtitle1:I(h,16,1.75,.15),subtitle2:I(m,14,1.57,.1),body1:I(h,16,1.5,.15),body2:I(h,14,1.43,.15),button:I(m,14,1.75,.4,k),caption:I(h,12,1.66,.4),overline:I(h,12,2.66,1,k)};return(0,i.Z)((0,s.Z)({htmlFontSize:b,pxToRem:C,round:E,fontFamily:a,fontSize:l,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:m,fontWeightBold:v},T),A,{clone:!1})}var M=.2,C=.14,I=.12;function T(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(M,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(C,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(I,")")].join(",")}const P=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)];const O={borderRadius:4};var R=r(87187);var N=r(90873),B=r(4563);function L(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,a=e.mixins,_=void 0===a?{}:a,E=e.palette,k=void 0===E?{}:E,S=e.spacing,M=e.typography,C=void 0===M?{}:M,I=(0,n.Z)(e,["breakpoints","mixins","palette","spacing","typography"]),T=function(e){var t=e.primary,r=void 0===t?{light:f.Z[300],main:f.Z[500],dark:f.Z[700]}:t,o=e.secondary,a=void 0===o?{light:h.Z.A200,main:h.Z.A400,dark:h.Z.A700}:o,c=e.error,_=void 0===c?{light:p.Z[300],main:p.Z[500],dark:p.Z[700]}:c,E=e.warning,k=void 0===E?{light:m.Z[300],main:m.Z[500],dark:m.Z[700]}:E,S=e.info,A=void 0===S?{light:g.Z[300],main:g.Z[500],dark:g.Z[700]}:S,M=e.success,C=void 0===M?{light:v.Z[300],main:v.Z[500],dark:v.Z[700]}:M,I=e.type,T=void 0===I?"light":I,P=e.contrastThreshold,O=void 0===P?3:P,R=e.tonalOffset,N=void 0===R?.2:R,B=(0,n.Z)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function L(e){return(0,y.mi)(e,w.text.primary)>=O?w.text.primary:b.text.primary}var j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,s.Z)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error((0,l.Z)(4,t));if("string"!==typeof e.main)throw new Error((0,l.Z)(5,JSON.stringify(e.main)));return x(e,"light",r,N),x(e,"dark",n,N),e.contrastText||(e.contrastText=L(e.main)),e},D={dark:w,light:b};return(0,i.Z)((0,s.Z)({common:u.Z,type:T,primary:j(r),secondary:j(a,"A400","A200","A700"),error:j(_),warning:j(k),info:j(A),success:j(C),grey:d.Z,contrastThreshold:O,getContrastText:L,augmentColor:j,tonalOffset:N},D[T]),B)}(k),L=(0,o.Z)(r),j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,R.h)({spacing:e}),r=function(){for(var e=arguments.length,r=new Array(e),n=0;n1?F-1:0),z=1;z{"use strict";r.d(t,{Z:()=>n});const n=(0,r(77166).Z)()},87875:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(17692),i=r(17647),o=r(26727);const a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Z)(e,(0,n.Z)({defaultTheme:o.Z},t))}},27930:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(17692),i=r(64907),o=r(20240);function a(e){return String(parseFloat(e)).length===String(e).length}function s(e){return parseFloat(e)}function c(e){return function(t,r){var n=String(t).match(/[\d.\-+]*\s*(.*)/)[1]||"";if(n===r)return t;var i=s(t);if("px"!==n)if("em"===n)i=s(t)*s(e);else if("rem"===n)return i=s(t)*s(e),t;var o=i;if("px"!==r)if("em"===r)o=i/s(e);else{if("rem"!==r)return t;o=i/s(e)}return parseFloat(o.toFixed(5))+r}}function l(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.breakpoints,s=void 0===r?["sm","md","lg"]:r,u=t.disableAlign,d=void 0!==u&&u,f=t.factor,h=void 0===f?2:f,p=t.variants,m=void 0===p?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:p,g=(0,n.Z)({},e);g.typography=(0,n.Z)({},g.typography);var v=g.typography,y=c(v.htmlFontSize),b=s.map((function(e){return g.breakpoints.values[e]}));return m.forEach((function(e){var t=v[e],r=parseFloat(y(t.fontSize,"rem"));if(!(r<=1)){var s=r,c=1+(s-1)/h,u=t.lineHeight;if(!a(u)&&!d)throw new Error((0,i.Z)(6));a(u)||(u=parseFloat(y(u,"rem"))/parseFloat(r));var f=null;d||(f=function(e){return function(e){var t=e.size,r=e.grid,n=t-t%r,i=n+r;return t-n{"use strict";r.d(t,{Ui:()=>i,ZP:()=>s,x9:()=>o});var n=r(29382),i={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function a(e){return"".concat(Math.round(e),"ms")}const s={easing:i,duration:o,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.duration,s=void 0===r?o.standard:r,c=t.easing,l=void 0===c?i.easeInOut:c,u=t.delay,d=void 0===u?0:u;(0,n.Z)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof s?s:a(s)," ").concat(l," ").concat("string"===typeof d?d:a(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},6785:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(56444),i=(r(83358),r(26727));function o(){return(0,n.Z)()||i.Z}},33437:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(17692),i=r(29382),o=r(83358),a=r(85419),s=r.n(a),c=r(17647),l=r(40807),u=r(56444);const d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){var a=t.defaultTheme,d=t.withTheme,f=void 0!==d&&d,h=t.name,p=(0,i.Z)(t,["defaultTheme","withTheme","name"]);var m=h,g=(0,c.Z)(e,(0,n.Z)({defaultTheme:a,Component:r,name:h||r.displayName,classNamePrefix:m},p)),v=o.forwardRef((function(e,t){e.classes;var s,c=e.innerRef,d=(0,i.Z)(e,["classes","innerRef"]),p=g((0,n.Z)({},r.defaultProps,e)),m=d;return("string"===typeof h||f)&&(s=(0,u.Z)()||a,h&&(m=(0,l.Z)({theme:s,name:h,props:d})),f&&!m.theme&&(m.theme=s)),o.createElement(r,(0,n.Z)({ref:c||t,classes:p},m))}));return s()(v,r),v}};var f=r(26727);const h=function(e,t){return d(e,(0,n.Z)({defaultTheme:f.Z},t))}},4563:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},19219:(e,t,r)=>{"use strict";r.d(t,{C:()=>i,n:()=>n});var n=function(e){return e.scrollTop};function i(e,t){var r=e.timeout,n=e.style,i=void 0===n?{}:n;return{duration:i.transitionDuration||"number"===typeof r?r:r[t.mode]||0,delay:i.transitionDelay}}},28570:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(64907);function i(e){if("string"!==typeof e)throw new Error((0,n.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},76702:(e,t,r)=>{"use strict";function n(){for(var e=arguments.length,t=new Array(e),r=0;rn})},65038:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(17692),i=r(83358),o=r(97012);function a(e,t){var r=function(t,r){return i.createElement(o.Z,(0,n.Z)({ref:r},t),e)};return r.muiName=o.Z.muiName,i.memo(i.forwardRef(r))}},88448:(e,t,r)=>{"use strict";function n(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,i=new Array(n),o=0;on})},63060:(e,t,r)=>{"use strict";r.r(t),r.d(t,{capitalize:()=>n.Z,createChainedFunction:()=>i.Z,createSvgIcon:()=>o.Z,debounce:()=>a.Z,deprecatedPropType:()=>s,isMuiElement:()=>c.Z,ownerDocument:()=>l.Z,ownerWindow:()=>u.Z,requirePropFactory:()=>d,setRef:()=>f.Z,unstable_useId:()=>v.Z,unsupportedProp:()=>h,useControlled:()=>p.Z,useEventCallback:()=>m.Z,useForkRef:()=>g.Z,useIsFocusVisible:()=>y.Z});var n=r(28570),i=r(76702),o=r(65038),a=r(88448);function s(e,t){return function(){return null}}var c=r(48513),l=r(2320),u=r(45095);function d(e){return function(){return null}}var f=r(6711);function h(e,t,r,n,i){return null}var p=r(70475),m=r(11964),g=r(27898),v=r(38162),y=r(6922)},48513:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(83358);function i(e,t){return n.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},2320:(e,t,r)=>{"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{Z:()=>n})},45095:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(2320);function i(e){return(0,n.Z)(e).defaultView||window}},6711:(e,t,r)=>{"use strict";function n(e,t){"function"===typeof e?e(t):e&&(e.current=t)}r.d(t,{Z:()=>n})},38162:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(83358);function i(e){var t=n.useState(e),r=t[0],i=t[1],o=e||r;return n.useEffect((function(){null==r&&i("mui-".concat(Math.round(1e5*Math.random())))}),[r]),o}},70475:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(83358);function i(e){var t=e.controlled,r=e.default,i=(e.name,e.state,n.useRef(void 0!==t).current),o=n.useState(r),a=o[0],s=o[1];return[i?t:a,n.useCallback((function(e){i||s(e)}),[])]}},11964:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(83358),i="undefined"!==typeof window?n.useLayoutEffect:n.useEffect;function o(e){var t=n.useRef(e);return i((function(){t.current=e})),n.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},27898:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(83358),i=r(6711);function o(e,t){return n.useMemo((function(){return null==e&&null==t?null:function(r){(0,i.Z)(e,r),(0,i.Z)(t,r)}}),[e,t])}},6922:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(83358),i=r(9339),o=!0,a=!1,s=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function u(){o=!1}function d(){"hidden"===this.visibilityState&&a&&(o=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(r){}return o||function(e){var t=e.type,r=e.tagName;return!("INPUT"!==r||!c[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}function h(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function p(){return{isFocusVisible:f,onBlurVisible:h,ref:n.useCallback((function(e){var t,r=i.findDOMNode(e);null!=r&&((t=r.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[])}}},84731:(e,t)=>{"use strict";var r=60103,n=60106,i=60107,o=60108,a=60114,s=60109,c=60110,l=60112,u=60113,d=60120,f=60115,h=60116,p=60121,m=60122,g=60117,v=60129,y=60131;if("function"===typeof Symbol&&Symbol.for){var b=Symbol.for;r=b("react.element"),n=b("react.portal"),i=b("react.fragment"),o=b("react.strict_mode"),a=b("react.profiler"),s=b("react.provider"),c=b("react.context"),l=b("react.forward_ref"),u=b("react.suspense"),d=b("react.suspense_list"),f=b("react.memo"),h=b("react.lazy"),p=b("react.block"),m=b("react.server.block"),g=b("react.fundamental"),v=b("react.debug_trace_mode"),y=b("react.legacy_hidden")}function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case a:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case h:case f:case s:return e;default:return t}}case n:return t}}}},73219:(e,t,r)=>{"use strict";r(84731)},18078:(e,t,r)=>{"use strict";var n=r(95656),i=r(10735);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(83358)),a=(0,n(r(48621)).default)(o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.88-11.71L10 14.17l-1.88-1.88a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41l2.59 2.59c.39.39 1.02.39 1.41 0L17.3 9.7c.39-.39.39-1.02 0-1.41-.39-.39-1.03-.39-1.42 0z"}),"CheckCircleOutlineRounded");t.default=a},48104:(e,t,r)=>{"use strict";var n=r(95656),i=r(10735);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(83358)),a=(0,n(r(48621)).default)(o.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.default=a},60840:(e,t,r)=>{"use strict";var n=r(95656),i=r(10735);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(83358)),a=(0,n(r(48621)).default)(o.createElement("path",{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");t.default=a},6221:(e,t,r)=>{"use strict";var n=r(95656),i=r(10735);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(83358)),a=(0,n(r(48621)).default)(o.createElement("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");t.default=a},80524:(e,t,r)=>{"use strict";var n=r(95656),i=r(10735);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(83358)),a=(0,n(r(48621)).default)(o.createElement("path",{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"}),"SwapVert");t.default=a},48621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(63060)},37814:(e,t,r)=>{"use strict";r.d(t,{NU:()=>f,ZP:()=>h});var n,i=r(17692),o=r(29382),a=r(83358),s=r(61145),c=r(72573),l=r(28888),u=(0,c.Ue)((0,l.Z)()),d={disableGeneration:!1,generateClassName:(0,s.Z)(),jss:u,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},f=a.createContext(d);function h(e){var t=e.children,r=e.injectFirst,s=void 0!==r&&r,u=e.disableGeneration,d=void 0!==u&&u,h=(0,o.Z)(e,["children","injectFirst","disableGeneration"]),p=a.useContext(f),m=(0,i.Z)({},p,{disableGeneration:d},h);if(!m.jss.options.insertionPoint&&s&&"undefined"!==typeof window){if(!n){var g=document.head;n=document.createComment("mui-inject-first"),g.insertBefore(n,g.firstChild)}m.jss=(0,c.Ue)({plugins:(0,l.Z)().plugins,insertionPoint:n})}return a.createElement(f.Provider,{value:m},t)}},58266:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(17692),i=r(83358),o=r(77756),a=r(56444),s=r(74703);const c=function(e){var t=e.children,r=e.theme,c=(0,a.Z)(),l=i.useMemo((function(){var e=null===c?r:function(e,t){return"function"===typeof t?t(e):(0,n.Z)({},e,t)}(c,r);return null!=e&&(e[s.Z]=null!==c),e}),[r,c]);return i.createElement(o.Z.Provider,{value:l},t)}},74703:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"},61145:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(74703),i=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,r=void 0!==t&&t,o=e.productionPrefix,a=void 0===o?"jss":o,s=e.seed,c=void 0===s?"":s,l=""===c?"":"".concat(c,"-"),u=0,d=function(){return u+=1};return function(e,t){var o=t.options.name;if(o&&0===o.indexOf("Mui")&&!t.options.link&&!r){if(-1!==i.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(l).concat(o,"-").concat(e.key);return t.options.theme[n.Z]&&""===c?"".concat(s,"-").concat(d()):s}return"".concat(l).concat(a).concat(d())}}},40807:(e,t,r)=>{"use strict";function n(e){var t=e.theme,r=e.name,n=e.props;if(!t||!t.props||!t.props[r])return n;var i,o=t.props[r];for(i in o)void 0===n[i]&&(n[i]=o[i]);return n}r.d(t,{Z:()=>n})},28888:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Pe});var n=r(72573),i=Date.now(),o="fnValues"+i,a="fnStyle"+ ++i;const s=function(){return{onCreateRule:function(e,t,r){if("function"!==typeof t)return null;var i=(0,n.JH)(e,{},r);return i[a]=t,i},onProcessStyle:function(e,t){if(o in t||a in t)return e;var r={};for(var n in e){var i=e[n];"function"===typeof i&&(delete e[n],r[n]=i)}return t[o]=r,e},onUpdate:function(e,t,r,n){var i=t,s=i[a];s&&(i.style=s(e)||{});var c=i[o];if(c)for(var l in c)i.prop(l,c[l](e),n)}}};var c=r(17692),l="@global",u="@global ",d=function(){function e(e,t,r){for(var i in this.type="global",this.at=l,this.isProcessed=!1,this.key=e,this.options=r,this.rules=new n.RB((0,c.Z)({},r,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),f=function(){function e(e,t,r){this.type="global",this.at=l,this.isProcessed=!1,this.key=e,this.options=r;var n=e.substr(u.length);this.rule=r.jss.createRule(n,t,(0,c.Z)({},r,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),h=/\s*,\s*/g;function p(e,t){for(var r=e.split(h),n="",i=0;i-1){var i=fe[e];if(!Array.isArray(i))return H.js+Y(i)in t&&H.css+i;if(!n)return!1;for(var o=0;ot?1:-1:e.length-t.length};return{onProcessStyle:function(t,r){if("style"!==r.type)return t;for(var n={},i=Object.keys(t).sort(e),o=0;o{"use strict";r.d(t,{Z:()=>p});var n=r(29382),i=r(17692),o=r(83358),a=r(72573),s=r(11173);const c={set:function(e,t,r,n){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(r,n)},get:function(e,t,r){var n=e.get(t);return n?n.get(r):void 0},delete:function(e,t,r){e.get(t).delete(r)}};var l=r(56444),u=r(37814),d=-1e9;var f=r(49998);const h={};function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name,p=t.classNamePrefix,m=t.Component,g=t.defaultTheme,v=void 0===g?h:g,y=(0,n.Z)(t,["name","classNamePrefix","Component","defaultTheme"]),b=function(e){var t="function"===typeof e;return{create:function(r,n){var o;try{o=t?e(r):e}catch(c){throw c}if(!n||!r.overrides||!r.overrides[n])return o;var a=r.overrides[n],s=(0,i.Z)({},o);return Object.keys(a).forEach((function(e){s[e]=(0,f.Z)(s[e],a[e])})),s},options:{}}}(e),w=r||p||"makeStyles";b.options={index:d+=1,name:r,meta:w,classNamePrefix:w};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,l.Z)()||v,n=(0,i.Z)({},o.useContext(u.NU),y),d=o.useRef(),f=o.useRef();!function(e,t){var r,n=o.useRef([]),i=o.useMemo((function(){return{}}),t);n.current!==i&&(n.current=i,r=e()),o.useEffect((function(){return function(){r&&r()}}),[i])}((function(){var o={name:r,state:{},stylesCreator:b,stylesOptions:n,theme:t};return function(e,t){var r=e.state,n=e.theme,o=e.stylesOptions,l=e.stylesCreator,u=e.name;if(!o.disableGeneration){var d=c.get(o.sheetsManager,l,n);d||(d={refs:0,staticSheet:null,dynamicStyles:null},c.set(o.sheetsManager,l,n,d));var f=(0,i.Z)({},l.options,o,{theme:n,flip:"boolean"===typeof o.flip?o.flip:"rtl"===n.direction});f.generateId=f.serverGenerateClassName||f.generateClassName;var h=o.sheetsRegistry;if(0===d.refs){var p;o.sheetsCache&&(p=c.get(o.sheetsCache,l,n));var m=l.create(n,u);p||((p=o.jss.createStyleSheet(m,(0,i.Z)({link:!1},f))).attach(),o.sheetsCache&&c.set(o.sheetsCache,l,n,p)),h&&h.add(p),d.staticSheet=p,d.dynamicStyles=(0,a._$)(m)}if(d.dynamicStyles){var g=o.jss.createStyleSheet(d.dynamicStyles,(0,i.Z)({link:!0},f));g.update(t),g.attach(),r.dynamicSheet=g,r.classes=(0,s.Z)({baseClasses:d.staticSheet.classes,newClasses:g.classes}),h&&h.add(g)}else r.classes=d.staticSheet.classes;d.refs+=1}}(o,e),f.current=!1,d.current=o,function(){!function(e){var t=e.state,r=e.theme,n=e.stylesOptions,i=e.stylesCreator;if(!n.disableGeneration){var o=c.get(n.sheetsManager,i,r);o.refs-=1;var a=n.sheetsRegistry;0===o.refs&&(c.delete(n.sheetsManager,i,r),n.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(n.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(o)}}),[t,b]),o.useEffect((function(){f.current&&function(e,t){var r=e.state;r.dynamicSheet&&r.dynamicSheet.update(t)}(d.current,e),f.current=!0}));var h=function(e,t,r){var n=e.state;if(e.stylesOptions.disableGeneration)return t||{};n.cacheClasses||(n.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return n.classes!==n.cacheClasses.lastJSS&&(n.cacheClasses.lastJSS=n.classes,i=!0),t!==n.cacheClasses.lastProp&&(n.cacheClasses.lastProp=t,i=!0),i&&(n.cacheClasses.value=(0,s.Z)({baseClasses:n.cacheClasses.lastJSS,newClasses:t,Component:r})),n.cacheClasses.value}(d.current,e.classes,m);return h}}},11173:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(17692);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,r=e.newClasses;e.Component;if(!r)return t;var i=(0,n.Z)({},t);return Object.keys(r).forEach((function(e){r[e]&&(i[e]="".concat(t[e]," ").concat(r[e]))})),i}},77756:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(83358).createContext(null)},56444:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(83358),i=r(77756);function o(){return n.useContext(i.Z)}},74511:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(7209),i={xs:0,sm:600,md:960,lg:1280,xl:1920},o={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(i[e],"px)")}};function a(e,t,r){if(Array.isArray(t)){var i=e.theme.breakpoints||o;return t.reduce((function(e,n,o){return e[i.up(i.keys[o])]=r(t[o]),e}),{})}if("object"===(0,n.Z)(t)){var a=e.theme.breakpoints||o;return Object.keys(t).reduce((function(e,n){return e[a.up(n)]=r(t[n]),e}),{})}return r(t)}},49030:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(49998);const i=function(e,t){return t?(0,n.Z)(e,t,{clone:!1}):e}},87187:(e,t,r)=>{"use strict";r.d(t,{h:()=>d,Z:()=>p});var n=r(23680),i=r(74511),o=r(49030);var a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},l=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}((function(e){if(e.length>2){if(!c[e])return[e];e=c[e]}var t=e.split(""),r=(0,n.Z)(t,2),i=r[0],o=r[1],l=a[i],u=s[o]||"";return Array.isArray(u)?u.map((function(e){return l+e})):[l+u]})),u=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function d(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function f(e,t){return function(r){return e.reduce((function(e,n){return e[n]=function(e,t){if("string"===typeof t||null==t)return t;var r=e(Math.abs(t));return t>=0?r:"number"===typeof r?-r:"-".concat(r)}(t,r),e}),{})}}function h(e){var t=d(e.theme);return Object.keys(e).map((function(r){if(-1===u.indexOf(r))return null;var n=f(l(r),t),o=e[r];return(0,i.k)(e,o,n)})).reduce(o.Z,{})}h.propTypes={},h.filterProps=u;const p=h},49998:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(17692),i=r(7209);function o(e){return e&&"object"===(0,i.Z)(e)&&e.constructor===Object}function a(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=r.clone?(0,n.Z)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((function(n){"__proto__"!==n&&(o(t[n])&&n in e?i[n]=a(e[n],t[n],r):i[n]=t[n])})),i}},64907:(e,t,r)=>{"use strict";function n(e){for(var t="https://mui.com/production-error/?code="+e,r=1;rn})},86251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.schnorr=t.verify=t.signSync=t.sign=t.getSharedSecret=t.recoverPublicKey=t.getPublicKey=t.Signature=t.Point=t.CURVE=void 0;const n=r(69159),i=BigInt(0),o=BigInt(1),a=BigInt(2),s=BigInt(3),c=BigInt(8),l=Object.freeze({a:i,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:o,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});t.CURVE=l;const u=(e,t)=>(e+t/a)/t,d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(e){const{n:t}=l,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-o*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),c=u(a*e,t),d=u(-n*e,t);let f=U(e-c*r-d*i,t),h=U(-c*n-d*a,t);const p=f>s,m=h>s;if(p&&(f=t-f),m&&(h=t-h),f>s||h>s)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:p,k1:f,k2neg:m,k2:h}}},f=32,h=32,p=32,m=f+1,g=2*f+1;function v(e){const{a:t,b:r}=l,n=U(e*e),i=U(n*e);return U(i+t*e+r)}const y=l.a===i;class b extends Error{constructor(e){super(e)}}function w(e){if(!(e instanceof x))throw new TypeError("JacobianPoint expected")}class x{constructor(e,t,r){this.x=e,this.y=t,this.z=r}static fromAffine(e){if(!(e instanceof k))throw new TypeError("JacobianPoint#fromAffine: expected Point");return e.equals(k.ZERO)?x.ZERO:new x(e.x,e.y,o)}static toAffineBatch(e){const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.P;const r=new Array(e.length),n=Z(e.reduce(((e,n,o)=>n===i?e:(r[o]=e,U(e*n,t))),o),t);return e.reduceRight(((e,n,o)=>n===i?e:(r[o]=U(e*r[o],t),U(e*n,t))),n),r}(e.map((e=>e.z)));return e.map(((e,r)=>e.toAffine(t[r])))}static normalizeZ(e){return x.toAffineBatch(e).map(x.fromAffine)}equals(e){w(e);const{x:t,y:r,z:n}=this,{x:i,y:o,z:a}=e,s=U(n*n),c=U(a*a),l=U(t*c),u=U(i*s),d=U(U(r*a)*c),f=U(U(o*n)*s);return l===u&&d===f}negate(){return new x(this.x,U(-this.y),this.z)}double(){const{x:e,y:t,z:r}=this,n=U(e*e),i=U(t*t),o=U(i*i),l=e+i,u=U(a*(U(l*l)-n-o)),d=U(s*n),f=U(d*d),h=U(f-a*u),p=U(d*(u-h)-c*o),m=U(a*t*r);return new x(h,p,m)}add(e){w(e);const{x:t,y:r,z:n}=this,{x:o,y:s,z:c}=e;if(o===i||s===i)return this;if(t===i||r===i)return e;const l=U(n*n),u=U(c*c),d=U(t*u),f=U(o*l),h=U(U(r*c)*u),p=U(U(s*n)*l),m=U(f-d),g=U(p-h);if(m===i)return g===i?this.double():x.ZERO;const v=U(m*m),y=U(m*v),b=U(d*v),_=U(g*g-y-a*b),E=U(g*(b-_)-h*y),k=U(n*c*m);return new x(_,E,k)}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){const t=x.ZERO;if("bigint"===typeof e&&e===i)return t;let r=F(e);if(r===o)return this;if(!y){let e=t,n=this;for(;r>i;)r&o&&(e=e.add(n)),n=n.double(),r>>=o;return e}let{k1neg:n,k1:a,k2neg:s,k2:c}=d.splitScalar(r),l=t,u=t,f=this;for(;a>i||c>i;)a&o&&(l=l.add(f)),c&o&&(u=u.add(f)),f=f.double(),a>>=o,c>>=o;return n&&(l=l.negate()),s&&(u=u.negate()),u=new x(U(u.x*d.beta),u.y,u.z),l.add(u)}precomputeWindow(e){const t=y?128/e+1:256/e+1,r=[];let n=this,i=n;for(let o=0;o>=d,r>c&&(r-=u,e+=o);const s=t,h=t+Math.abs(r)-1,p=f%2!==0,m=r<0;0===r?a=a.add(_(p,n[s])):i=i.add(_(m,n[h]))}return{p:i,f:a}}multiply(e,t){let r,n,i=F(e);if(y){const{k1neg:e,k1:o,k2neg:a,k2:s}=d.splitScalar(i);let{p:c,f:l}=this.wNAF(o,t),{p:u,f:f}=this.wNAF(s,t);c=_(e,c),u=_(a,u),u=new x(U(u.x*d.beta),u.y,u.z),r=c.add(u),n=l.add(f)}else{const{p:e,f:o}=this.wNAF(i,t);r=e,n=o}return x.normalizeZ([r,n])[0]}toAffine(e){const{x:t,y:r,z:n}=this,i=this.equals(x.ZERO);null==e&&(e=i?c:Z(n));const a=e,s=U(a*a),l=U(s*a),u=U(t*s),d=U(r*l),f=U(n*a);if(i)return k.ZERO;if(f!==o)throw new Error("invZ was invalid");return new k(u,d)}}function _(e,t){const r=t.negate();return e?r:t}x.BASE=new x(l.Gx,l.Gy,o),x.ZERO=new x(i,o,i);const E=new WeakMap;class k{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,E.delete(this)}hasEvenY(){return this.y%a===i}static fromCompressedHex(e){const t=32===e.length,r=j(t?e:e.subarray(1));if(!K(r))throw new Error("Point is not on curve");let n=function(e){const{P:t}=l,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,f=d*d*e%t,h=z(f,s)*f%t,p=z(h,s)*f%t,m=z(p,a)*d%t,g=z(m,n)*m%t,v=z(g,i)*g%t,y=z(v,c)*v%t,b=z(y,u)*y%t,w=z(b,c)*v%t,x=z(w,s)*f%t,_=z(x,o)*g%t,E=z(_,r)*d%t,k=z(E,a);if(k*k%t!==e)throw new Error("Cannot find square root");return k}(v(r));const i=(n&o)===o;if(t)i&&(n=U(-n));else{1===(1&e[0])!==i&&(n=U(-n))}const c=new k(r,n);return c.assertValidity(),c}static fromUncompressedHex(e){const t=j(e.subarray(1,f+1)),r=j(e.subarray(f+1,2*f+1)),n=new k(t,r);return n.assertValidity(),n}static fromHex(e){const t=D(e),r=t.length,n=t[0];if(r===f)return this.fromCompressedHex(t);if(r===m&&(2===n||3===n))return this.fromCompressedHex(t);if(r===g&&4===n)return this.fromUncompressedHex(t);throw new Error(`Point.fromHex: received invalid point. Expected 32-${m} compressed bytes or ${g} uncompressed bytes, not ${r}`)}static fromPrivateKey(e){return k.BASE.multiply(Y(e))}static fromSignature(e,t,r){const{r:n,s:i}=X(t);if(![0,1,2,3].includes(r))throw new Error("Cannot recover: invalid recovery bit");const o=q(D(e)),{n:a}=l,s=2===r||3===r?n+a:n,c=Z(s,a),u=U(-o*c,a),d=U(i*c,a),f=1&r?"03":"02",h=k.fromHex(f+O(s)),p=k.BASE.multiplyAndAddUnsafe(h,u,d);if(!p)throw new Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return L(this.toHex(e))}toHex(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=O(this.x);if(e){return`${this.hasEvenY()?"02":"03"}${t}`}return`04${t}${O(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const e="Point is not on elliptic curve",{x:t,y:r}=this;if(!K(t)||!K(r))throw new Error(e);const n=U(r*r);if(U(n-v(t))!==i)throw new Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new k(this.x,U(-this.y))}double(){return x.fromAffine(this).double().toAffine()}add(e){return x.fromAffine(this).add(x.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return x.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,t,r){const n=x.fromAffine(this),a=t===i||t===o||this!==k.BASE?n.multiplyUnsafe(t):n.multiply(t),s=x.fromAffine(e).multiplyUnsafe(r),c=a.add(s);return c.equals(x.ZERO)?void 0:c.toAffine()}}function S(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function A(e){if(e.length<2||2!==e[0])throw new Error(`Invalid signature integer tag: ${T(e)}`);const t=e[1],r=e.subarray(2,t+2);if(!t||r.length!==t)throw new Error("Invalid signature integer: wrong length");if(0===r[0]&&r[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:j(r),left:e.subarray(t+2)}}t.Point=k,k.BASE=new k(l.Gx,l.Gy),k.ZERO=new k(i,i);class M{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromCompact(e){const t=e instanceof Uint8Array,r="Signature.fromCompact";if("string"!==typeof e&&!t)throw new TypeError(`${r}: Expected string or Uint8Array`);const n=t?T(e):e;if(128!==n.length)throw new Error(`${r}: Expected 64-byte hex`);return new M(B(n.slice(0,64)),B(n.slice(64,128)))}static fromDER(e){const t=e instanceof Uint8Array;if("string"!==typeof e&&!t)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:r,s:n}=function(e){if(e.length<2||48!=e[0])throw new Error(`Invalid signature tag: ${T(e)}`);if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");const{data:t,left:r}=A(e.subarray(2)),{data:n,left:i}=A(r);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${T(i)}`);return{r:t,s:n}}(t?e:L(e));return new M(r,n)}static fromHex(e){return this.fromDER(e)}assertValidity(){const{r:e,s:t}=this;if(!$(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!$(t))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const e=l.n>>o;return this.s>e}normalizeS(){return this.hasHighS()?new M(this.r,U(-this.s,l.n)):this}toDERRawBytes(){return L(this.toDERHex())}toDERHex(){const e=S(N(this.s)),t=S(N(this.r)),r=e.length/2,n=t.length/2,i=N(r),o=N(n);return`30${N(n+r+4)}02${o}${t}02${i}${e}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return L(this.toCompactHex())}toCompactHex(){return O(this.r)+O(this.s)}}function C(){for(var e=arguments.length,t=new Array(e),r=0;re instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const n=t.reduce(((e,t)=>e+t.length),0),i=new Uint8Array(n);for(let o=0,a=0;ot.toString(16).padStart(2,"0")));function T(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");let t="";for(let r=0;r0)return BigInt(e);if("bigint"===typeof e&&$(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.P;const r=e%t;return r>=i?r:t+r}function z(e,t){const{P:r}=l;let n=e;for(;t-- >i;)n*=n,n%=r;return n}function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.P;if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=U(e,t),n=t,a=i,s=o,c=o,u=i;for(;r!==i;){const e=n/r,t=n%r,i=a-c*e,o=s-u*e;n=r,r=t,a=c,s=u,c=i,u=o}if(n!==o)throw new Error("invert: does not exist");return U(a,t)}function q(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=function(e){const t=8*e.length-8*h,r=j(e);return t>0?r>>BigInt(t):r}(e);if(t)return r;const{n:n}=l;return r>=n?r-n:r}let H,V;class W{constructor(e,t){if(this.hashLen=e,this.qByteLen=t,"number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(e).fill(1),this.k=new Uint8Array(e).fill(0),this.counter=0}hmac(){for(var e=arguments.length,r=new Array(e),n=0;n=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array;this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),0!==e.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array;this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),0!==e.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){this.incr();let e=0;const t=[];for(;e3&&void 0!==arguments[3])||arguments[3];const{n:a}=l,s=q(e,!0);if(!$(s))return;const c=Z(s,a),u=k.BASE.multiply(s),d=U(u.x,a);if(d===i)return;const f=U(c*U(t+r*d,a),a);if(f===i)return;let h=new M(d,f),p=(u.x===h.r?0:2)|Number(u.y&o);return n&&h.hasHighS()&&(h=h.normalizeS(),p^=1),{sig:h,recovery:p}}function Y(e){let t;if("bigint"===typeof e)t=e;else if("number"===typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"===typeof e){if(e.length!==2*h)throw new Error("Expected 32 bytes of private key");t=B(e)}else{if(!(e instanceof Uint8Array))throw new TypeError("Expected valid private key");if(e.length!==h)throw new Error("Expected 32 bytes of private key");t=j(e)}if(!$(t))throw new Error("Expected private key: 0 < key < n");return t}function J(e){return e instanceof k?(e.assertValidity(),e):k.fromHex(e)}function X(e){if(e instanceof M)return e.assertValidity(),e;try{return M.fromDER(e)}catch(t){return M.fromCompact(e)}}function Q(e){const t=e instanceof Uint8Array,r="string"===typeof e,n=(t||r)&&e.length;return t?n===m||n===g:r?n===2*m||n===2*g:e instanceof k}function ee(e){return j(e.length>f?e.slice(0,f):e)}function te(e){const t=ee(e),r=U(t,l.n);return re(r1&&void 0!==arguments[1]&&arguments[1];return k.fromPrivateKey(e).toRawBytes(t)},t.recoverPublicKey=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return k.fromSignature(e,t,r).toRawBytes(n)},t.getSharedSecret=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Q(e))throw new TypeError("getSharedSecret: first arg must be private key");if(!Q(t))throw new TypeError("getSharedSecret: second arg must be public key");const n=J(t);return n.assertValidity(),n.multiply(Y(e)).toRawBytes(r)},t.sign=async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{seed:n,m:i,d:o}=ne(e,t,r.extraEntropy),a=new W(p,h);let s;for(await a.reseed(n);!(s=G(await a.generate(),i,o,r.canonical));)await a.reseed();return ie(s,r)},t.signSync=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{seed:n,m:i,d:o}=ne(e,t,r.extraEntropy),a=new W(p,h);let s;for(a.reseedSync(n);!(s=G(a.generateSync(),i,o,r.canonical));)a.reseedSync();return ie(s,r)};const oe={strict:!0};function ae(e){return U(j(e),l.n)}t.verify=function(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:oe;try{n=X(e),t=D(t)}catch(m){return!1}const{r:o,s:a}=n;if(i.strict&&n.hasHighS())return!1;const s=q(t);let c;try{c=J(r)}catch(m){return!1}const{n:u}=l,d=Z(a,u),f=U(s*d,u),h=U(o*d,u),p=k.BASE.multiplyAndAddUnsafe(c,f,h);return!!p&&U(p.x,u)===o};class se{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromHex(e){const t=D(e);if(64!==t.length)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${t.length}`);const r=j(t.subarray(0,32)),n=j(t.subarray(32,64));return new se(r,n)}assertValidity(){const{r:e,s:t}=this;if(!K(e)||!$(t))throw new Error("Invalid signature")}toHex(){return O(this.r)+O(this.s)}toRawBytes(){return L(this.toHex())}}class ce{constructor(e,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.utils.randomBytes();if(null==e)throw new TypeError(`sign: Expected valid message, not "${e}"`);this.m=D(e);const{x:i,scalar:o}=this.getScalar(Y(r));if(this.px=i,this.d=o,this.rand=D(n),32!==this.rand.length)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(e){const t=k.fromPrivateKey(e),r=t.hasEvenY()?e:l.n-e;return{point:t,scalar:r,x:t.toRawX()}}initNonce(e,t){return R(e^j(t))}finalizeNonce(e){const t=U(j(e),l.n);if(t===i)throw new Error("sign: Creation of signature failed. k is zero");const{point:r,x:n,scalar:o}=this.getScalar(t);return{R:r,rx:n,k:o}}finalizeSig(e,t,r,n){return new se(e.x,U(t+r*n,l.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:e,d:r,px:n,rand:i}=this,o=t.utils.taggedHash,a=this.initNonce(r,await o(pe.aux,i)),{R:s,rx:c,k:l}=this.finalizeNonce(await o(pe.nonce,a,n,e)),u=ae(await o(pe.challenge,c,n,e)),d=this.finalizeSig(s,l,u,r);return await de(d,e,n)||this.error(),d}calcSync(){const{m:e,d:r,px:n,rand:i}=this,o=t.utils.taggedHashSync,a=this.initNonce(r,o(pe.aux,i)),{R:s,rx:c,k:l}=this.finalizeNonce(o(pe.nonce,a,n,e)),u=ae(o(pe.challenge,c,n,e)),d=this.finalizeSig(s,l,u,r);return fe(d,e,n)||this.error(),d}}function le(e,t,r){const n=e instanceof se,i=n?e:se.fromHex(e);return n&&i.assertValidity(),{...i,m:D(t),P:J(r)}}function ue(e,t,r,n){const i=k.BASE.multiplyAndAddUnsafe(t,Y(r),U(-n,l.n));return!(!i||!i.hasEvenY()||i.x!==e)}async function de(e,r,n){try{const{r:i,s:o,m:a,P:s}=le(e,r,n),c=ae(await t.utils.taggedHash(pe.challenge,R(i),s.toRawX(),a));return ue(i,s,o,c)}catch(i){return!1}}function fe(e,r,n){try{const{r:i,s:o,m:a,P:s}=le(e,r,n),c=ae(t.utils.taggedHashSync(pe.challenge,R(i),s.toRawX(),a));return ue(i,s,o,c)}catch(i){if(i instanceof b)throw i;return!1}}t.schnorr={Signature:se,getPublicKey:function(e){return k.fromPrivateKey(e).toRawX()},sign:async function(e,t,r){return new ce(e,t,r).calc()},verify:de,signSync:function(e,t,r){return new ce(e,t,r).calcSync()},verifySync:fe},k.BASE._setWindowSize(8);const he={node:n,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},pe={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},me={};t.utils={bytesToHex:T,hexToBytes:L,concatBytes:C,mod:U,invert:Z,isValidPrivateKey(e){try{return Y(e),!0}catch(t){return!1}},_bigintTo32Bytes:R,_normalizePrivateKey:Y,hashToPrivateKey:e=>{e=D(e);const t=h+8;if(e.length1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return R(U(j(e),l.n-o)+o)},randomBytes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(he.web)return he.web.getRandomValues(new Uint8Array(e));if(he.node){const{randomBytes:t}=he.node;return Uint8Array.from(t(e))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>t.utils.hashToPrivateKey(t.utils.randomBytes(h+8)),precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k.BASE;const r=t===k.BASE?t:new k(t.x,t.y);return r._setWindowSize(e),r.multiply(s),r},sha256:async function(){for(var e=arguments.length,t=new Array(e),r=0;rr.update(e))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nn.update(e))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async function(e){let r=me[e];if(void 0===r){const n=await t.utils.sha256(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=C(n,n),me[e]=r}for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;oe.charCodeAt(0))));t=C(r,r),me[e]=t}for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;iH,set(e){H||(H=e)}},hmacSha256Sync:{configurable:!1,get:()=>V,set(e){V||(V=e)}}})},42033:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:p(e)?3:0}function l(e,t){return 2===c(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){return 2===c(e)?e.get(t):e[t]}function d(e,t,r){var n=c(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return q&&e instanceof Map}function p(e){return H&&e instanceof Set}function m(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=J(e);delete t[K];for(var r=Y(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&s(e,(function(e,t){return v(t,!0)}),!0)),e}function y(){n(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function w(e){var t=X[e];return t||n(18,e),t}function x(e,t){X[e]||(X[e]=t)}function _(){return z}function E(e,t){t&&(w("Patches"),e.u=[],e.s=[],e.v=t)}function k(e){S(e),e.p.forEach(M),e.p=null}function S(e){e===z&&(z=e.l)}function A(e){return z={p:[],l:z,h:e,m:!0,_:0}}function M(e){var t=e[K];0===t.i||1===t.i?t.j():t.O=!0}function C(e,t){t._=t.p.length;var r=t.p[0],i=void 0!==e&&e!==r;return t.h.g||w("ES5").S(t,e,i),i?(r[K].P&&(k(t),n(4)),o(e)&&(e=I(t,e),t.l||P(t,e)),t.u&&w("Patches").M(r[K].t,e,t.u,t.s)):e=I(t,r,[]),k(t),t.u&&t.v(t.u,t.s),e!==W?e:void 0}function I(e,t,r){if(b(t))return t;var n=t[K];if(!n)return s(t,(function(i,o){return T(e,n,t,i,o,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return P(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=g(n.k):n.o,o=i,a=!1;3===n.i&&(o=new Set(i),i.clear(),a=!0),s(o,(function(t,o){return T(e,n,i,t,o,r,a)})),P(e,i,!1),r&&e.u&&w("Patches").N(n,r,e.u,e.s)}return n.o}function T(e,t,r,n,a,s,c){if(i(a)){var u=I(e,a,s&&t&&3!==t.i&&!l(t.R,n)?s.concat(n):void 0);if(d(r,n,u),!i(u))return;e.m=!1}else c&&r.add(a);if(o(a)&&!b(a)){if(!e.h.D&&e._<1)return;I(e,a),t&&t.A.l||P(e,a)}}function P(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&v(t,r)}function O(e,t){var r=e[K];return(r?m(r):e)[t]}function R(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function N(e){e.P||(e.P=!0,e.l&&N(e.l))}function B(e){e.o||(e.o=g(e.t))}function L(e,t,r){var n=h(t)?w("MapSet").F(t,r):p(t)?w("MapSet").T(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:_(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=n,o=Q;r&&(i=[n],o=ee);var a=Proxy.revocable(i,o),s=a.revoke,c=a.proxy;return n.k=c,n.j=s,c}(t,r):w("ES5").J(t,r);return(r?r.A:_()).p.push(n),n}function j(e){return i(e)||n(22,e),function e(t){if(!o(t))return t;var r,n=t[K],i=c(t);if(n){if(!n.P&&(n.i<4||!w("ES5").K(n)))return n.t;n.I=!0,r=D(t,i),n.I=!1}else r=D(t,i);return s(r,(function(t,i){n&&u(n.t,t)===i||d(r,t,e(i))})),3===i?new Set(r):r}(e)}function D(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}function F(){function e(e,t){var r=o[e];return r?r.enumerable=t:o[e]=r={configurable:!0,enumerable:t,get:function(){var t=this[K];return Q.get(t,e)},set:function(t){var r=this[K];Q.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][K];if(!i.P)switch(i.i){case 5:n(i)&&N(i);break;case 4:r(i)&&N(i)}}}function r(e){for(var t=e.t,r=e.k,n=Y(r),i=n.length-1;i>=0;i--){var o=n[i];if(o!==K){var a=t[o];if(void 0===a&&!l(t,o))return!0;var s=r[o],c=s&&s[K];if(c?c.t!==a:!f(s,a))return!0}}var u=!!t[K];return n.length!==Y(t).length+(u?0:1)}function n(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;nHe,SHOULD_AUTOBATCH:()=>dr,TaskAbortError:()=>Ht,__DO_NOT_USE__ActionTypes:()=>de,addListener:()=>or,applyMiddleware:()=>be,autoBatchEnhancer:()=>gr,bindActionCreators:()=>ve,clearAllListeners:()=>ar,combineReducers:()=>me,compose:()=>ye,configureStore:()=>et,createAction:()=>tt,createAsyncThunk:()=>bt,createDraftSafeSelector:()=>ze,createEntityAdapter:()=>ht,createImmutableStateInvariantMiddleware:()=>$e,createListenerMiddleware:()=>lr,createNextState:()=>ie,createReducer:()=>ot,createSelector:()=>ke,createSerializableStateInvariantMiddleware:()=>Je,createSlice:()=>at,createStore:()=>he,current:()=>j,findNonSerializableValue:()=>Ge,freeze:()=>v,getDefaultMiddleware:()=>Xe,getType:()=>nt,isAllOf:()=>Et,isAnyOf:()=>_t,isAsyncThunkAction:()=>Tt,isDraft:()=>i,isFulfilled:()=>It,isImmutableDefault:()=>We,isPending:()=>At,isPlain:()=>Ke,isPlainObject:()=>qe,isRejected:()=>Mt,isRejectedWithValue:()=>Ct,legacy_createStore:()=>pe,miniSerializeError:()=>yt,nanoid:()=>pt,original:()=>a,prepareAutoBatched:()=>fr,removeListener:()=>sr,unwrapResult:()=>wt});var U,z,Z="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),q="undefined"!=typeof Map,H="undefined"!=typeof Set,V="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=Z?Symbol.for("immer-nothing"):((U={})["immer-nothing"]=!0,U),$=Z?Symbol.for("immer-draftable"):"__$immer_draftable",K=Z?Symbol.for("immer-state"):"__$immer_state",G=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Y="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,J=Object.getOwnPropertyDescriptors||function(e){var t={};return Y(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},X={},Q={get:function(e,t){if(t===K)return e;var r=m(e);if(!l(r,t))return function(e,t,r){var n,i=R(t,r);return i?"value"in i?i.value:null===(n=i.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!o(n)?n:n===O(e.t,t)?(B(e),e.o[t]=L(e.A.h,n,e)):n},has:function(e,t){return t in m(e)},ownKeys:function(e){return Reflect.ownKeys(m(e))},set:function(e,t,r){var n=R(m(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=O(m(e),t),o=null==i?void 0:i[K];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(f(r,i)&&(void 0!==r||l(e.t,t)))return!0;B(e),N(e)}return e.o[t]===r&&(void 0!==r||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==O(e.t,t)||t in e.t?(e.R[t]=!1,B(e),N(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=m(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){n(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){n(12)}},ee={};s(Q,(function(e,t){ee[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ee.deleteProperty=function(e,t){return ee.set.call(this,e,t,void 0)},ee.set=function(e,t,r){return Q.set.call(this,e[0],t,r,e[0])};var te=function(){function e(e){var t=this;this.g=V,this.D=!0,this.produce=function(e,r,i){if("function"==typeof e&&"function"!=typeof r){var a=r;r=e;var s=t;return function(e){var t=this;void 0===e&&(e=a);for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var o=w("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),re=new te,ne=re.produce;re.produceWithPatches.bind(re),re.setAutoFreeze.bind(re),re.setUseProxies.bind(re),re.applyPatches.bind(re),re.createDraft.bind(re),re.finishDraft.bind(re);const ie=ne;var oe=r(20240);function ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function se(e){for(var t=1;t-1){var i=r[n];return n>0&&(r.splice(n,1),r.unshift(i)),i.value}return we}return{get:n,put:function(t,i){n(t)===we&&(r.unshift({key:t,value:i}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(a,c);function u(){var t=l.get(arguments);if(t===we){if(t=e.apply(null,arguments),s){var r=l.getEntries().find((function(e){return s(e.value,t)}));r&&(t=r.value)}l.put(arguments,t)}return t}return u.clearCache=function(){return l.clear()},u}function Ee(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]",value:e};if("object"!==typeof e||null===e)return!1;if(null==o?void 0:o.has(e))return!1;for(var s=null!=n?n(e):Object.entries(e),c=i.length>0,l=function(e,s){var l=t?t+"."+e:e;if(c&&i.some((function(e){return e instanceof RegExp?e.test(l):l===e})))return"continue";return r(s)?"object"===typeof s&&(a=Ge(s,l,r,n,i,o))?{value:a}:void 0:{value:{keyPath:l,value:s}}},u=0,d=s;u-1}function nt(e){return""+e}function it(e){var t,r={},n=[],i={addCase:function(e,t){var n="string"===typeof e?e:e.type;if(n in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[n]=t,i},addMatcher:function(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase:function(e){return t=e,i}};return e(i),[r,n,t]}function ot(e,t,r,n){void 0===r&&(r=[]);var a,s="function"===typeof t?it(t):[t,r,n],c=s[0],l=s[1],u=s[2];if(function(e){return"function"===typeof e}(e))a=function(){return Ve(e())};else{var d=Ve(e);a=function(){return d}}function f(e,t){void 0===e&&(e=a());var r=Te([c[t.type]],l.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===r.filter((function(e){return!!e})).length&&(r=[u]),r.reduce((function(e,r){if(r){var n;if(i(e))return void 0===(n=r(e,t))?e:n;if(o(e))return ie(e,(function(e){return r(e,t)}));if(void 0===(n=r(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return e}),e)}return f.getInitialState=a,f}function at(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var r,n="function"==typeof e.initialState?e.initialState:Ve(e.initialState),i=e.reducers||{},o=Object.keys(i),a={},s={},c={};function l(){var t="function"===typeof e.extraReducers?it(e.extraReducers):[e.extraReducers],r=t[0],i=void 0===r?{}:r,o=t[1],a=void 0===o?[]:o,c=t[2],l=void 0===c?void 0:c,u=De(De({},i),s);return ot(n,(function(e){for(var t in u)e.addCase(t,u[t]);for(var r=0,n=a;r0){var o=t.filter((function(t){return function(t,r,n){var i=n.entities[r.id],o=Object.assign({},i,r.changes),a=lt(o,e),s=a!==r.id;return s&&(t[r.id]=a,delete n.entities[r.id]),n.entities[a]=o,s}(n,t,r)})).length>0;o&&(r.ids=Object.keys(r.entities))}}function a(t,n){var i=dt(t,e,n),a=i[0];o(i[1],n),r(a,n)}return{removeAll:st((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:ct(t),addMany:ct(r),setOne:ct(n),setMany:ct((function(e,t){for(var r=0,i=e=ut(e);r-1;return r&&n}function St(e){return"function"===typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function At(){for(var e=[],t=0;t0)for(var f=e.getState(),h=Array.from(r.values()),p=0,m=h;p{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(96320);function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function o(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function a(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function s(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function l(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function u(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function f(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),u(e/4294967296>>>0,t,r),u(e>>>0,t,r+4),t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),d(e>>>0,t,r),d(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=o,t.writeInt16LE=o,t.readInt32BE=a,t.readUint32BE=s,t.readInt32LE=c,t.readUint32LE=l,t.writeUint32BE=u,t.writeInt32BE=u,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=a(e,t),n=a(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*s(e,t)+s(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r-4294967296*(r>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=l(e,t);return 4294967296*l(e,t+4)+r},t.writeUint64BE=f,t.writeInt64BE=f,t.writeUint64LE=h,t.writeInt64LE=h,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=e/8+r-1;o>=r;o--)n+=t[o]*i,i*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o=i;a--)r[a]=t/o&255,o*=256;return r},t.writeUintLE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,a=i;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(96091),i=r(38515),o=20;function a(e,t,r){for(var i=1634760805,a=857760878,s=2036477234,c=1797285236,l=r[3]<<24|r[2]<<16|r[1]<<8|r[0],u=r[7]<<24|r[6]<<16|r[5]<<8|r[4],d=r[11]<<24|r[10]<<16|r[9]<<8|r[8],f=r[15]<<24|r[14]<<16|r[13]<<8|r[12],h=r[19]<<24|r[18]<<16|r[17]<<8|r[16],p=r[23]<<24|r[22]<<16|r[21]<<8|r[20],m=r[27]<<24|r[26]<<16|r[25]<<8|r[24],g=r[31]<<24|r[30]<<16|r[29]<<8|r[28],v=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],b=t[11]<<24|t[10]<<16|t[9]<<8|t[8],w=t[15]<<24|t[14]<<16|t[13]<<8|t[12],x=i,_=a,E=s,k=c,S=l,A=u,M=d,C=f,I=h,T=p,P=m,O=g,R=v,N=y,B=b,L=w,j=0;j>>16|R<<16)|0)>>>20|S<<12,A=(A^=T=T+(N=(N^=_=_+A|0)>>>16|N<<16)|0)>>>20|A<<12,M=(M^=P=P+(B=(B^=E=E+M|0)>>>16|B<<16)|0)>>>20|M<<12,C=(C^=O=O+(L=(L^=k=k+C|0)>>>16|L<<16)|0)>>>20|C<<12,M=(M^=P=P+(B=(B^=E=E+M|0)>>>24|B<<8)|0)>>>25|M<<7,C=(C^=O=O+(L=(L^=k=k+C|0)>>>24|L<<8)|0)>>>25|C<<7,A=(A^=T=T+(N=(N^=_=_+A|0)>>>24|N<<8)|0)>>>25|A<<7,S=(S^=I=I+(R=(R^=x=x+S|0)>>>24|R<<8)|0)>>>25|S<<7,A=(A^=P=P+(L=(L^=x=x+A|0)>>>16|L<<16)|0)>>>20|A<<12,M=(M^=O=O+(R=(R^=_=_+M|0)>>>16|R<<16)|0)>>>20|M<<12,C=(C^=I=I+(N=(N^=E=E+C|0)>>>16|N<<16)|0)>>>20|C<<12,S=(S^=T=T+(B=(B^=k=k+S|0)>>>16|B<<16)|0)>>>20|S<<12,C=(C^=I=I+(N=(N^=E=E+C|0)>>>24|N<<8)|0)>>>25|C<<7,S=(S^=T=T+(B=(B^=k=k+S|0)>>>24|B<<8)|0)>>>25|S<<7,M=(M^=O=O+(R=(R^=_=_+M|0)>>>24|R<<8)|0)>>>25|M<<7,A=(A^=P=P+(L=(L^=x=x+A|0)>>>24|L<<8)|0)>>>25|A<<7;n.writeUint32LE(x+i|0,e,0),n.writeUint32LE(_+a|0,e,4),n.writeUint32LE(E+s|0,e,8),n.writeUint32LE(k+c|0,e,12),n.writeUint32LE(S+l|0,e,16),n.writeUint32LE(A+u|0,e,20),n.writeUint32LE(M+d|0,e,24),n.writeUint32LE(C+f|0,e,28),n.writeUint32LE(I+h|0,e,32),n.writeUint32LE(T+p|0,e,36),n.writeUint32LE(P+m|0,e,40),n.writeUint32LE(O+g|0,e,44),n.writeUint32LE(R+v|0,e,48),n.writeUint32LE(N+y|0,e,52),n.writeUint32LE(B+b|0,e,56),n.writeUint32LE(L+w|0,e,60)}function s(e,t,r,n,o){if(void 0===o&&(o=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=s,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),s(e,t,r,r,n)}},85804:(e,t,r)=>{"use strict";var n=r(95238),i=r(5849),o=r(38515),a=r(96091),s=r(11479);t.Cv=32,t.WH=12,t.pg=16;var c=new Uint8Array(16),l=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var a=new Uint8Array(16);a.set(e,a.length-e.length);var s=new Uint8Array(32);n.stream(this._key,a,s,4);var c,l=t.length+this.tagLength;if(i){if(i.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");c=i}else c=new Uint8Array(l);return n.streamXOR(this._key,a,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),r),o.wipe(a),c},e.prototype.open=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&s.update(c.subarray(n.length%16))),s.update(r),r.length%16>0&&s.update(c.subarray(r.length%16));var l=new Uint8Array(8);n&&a.writeUint64LE(n.length,l),s.update(l),a.writeUint64LE(r.length,l),s.update(l);for(var u=s.digest(),d=0;d{"use strict";function r(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,r){return~(e-1)&t|e-1&r},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=r,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==r(e,t)}},95714:(e,t,r)=>{"use strict";t.Xx=t._w=t.aP=t.KS=t.jQ=void 0;const n=r(43226),i=r(49764),o=r(38515);function a(e){const t=new Float64Array(16);if(e)for(let r=0;r>16&1),r[t-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,g(n,r,1-e)}for(let i=0;i<16;i++)e[2*i]=255&n[i],e[2*i+1]=n[i]>>8}function y(e,t){let r=0;for(let n=0;n<32;n++)r|=e[n]^t[n];return(1&r-1>>>8)-1}function b(e,t){const r=new Uint8Array(32),n=new Uint8Array(32);return v(r,e),v(n,t),y(r,n)}function w(e){const t=new Uint8Array(32);return v(t,e),1&t[0]}function x(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function _(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function E(e,t,r){let n,i,o=0,a=0,s=0,c=0,l=0,u=0,d=0,f=0,h=0,p=0,m=0,g=0,v=0,y=0,b=0,w=0,x=0,_=0,E=0,k=0,S=0,A=0,M=0,C=0,I=0,T=0,P=0,O=0,R=0,N=0,B=0,L=r[0],j=r[1],D=r[2],F=r[3],U=r[4],z=r[5],Z=r[6],q=r[7],H=r[8],V=r[9],W=r[10],$=r[11],K=r[12],G=r[13],Y=r[14],J=r[15];n=t[0],o+=n*L,a+=n*j,s+=n*D,c+=n*F,l+=n*U,u+=n*z,d+=n*Z,f+=n*q,h+=n*H,p+=n*V,m+=n*W,g+=n*$,v+=n*K,y+=n*G,b+=n*Y,w+=n*J,n=t[1],a+=n*L,s+=n*j,c+=n*D,l+=n*F,u+=n*U,d+=n*z,f+=n*Z,h+=n*q,p+=n*H,m+=n*V,g+=n*W,v+=n*$,y+=n*K,b+=n*G,w+=n*Y,x+=n*J,n=t[2],s+=n*L,c+=n*j,l+=n*D,u+=n*F,d+=n*U,f+=n*z,h+=n*Z,p+=n*q,m+=n*H,g+=n*V,v+=n*W,y+=n*$,b+=n*K,w+=n*G,x+=n*Y,_+=n*J,n=t[3],c+=n*L,l+=n*j,u+=n*D,d+=n*F,f+=n*U,h+=n*z,p+=n*Z,m+=n*q,g+=n*H,v+=n*V,y+=n*W,b+=n*$,w+=n*K,x+=n*G,_+=n*Y,E+=n*J,n=t[4],l+=n*L,u+=n*j,d+=n*D,f+=n*F,h+=n*U,p+=n*z,m+=n*Z,g+=n*q,v+=n*H,y+=n*V,b+=n*W,w+=n*$,x+=n*K,_+=n*G,E+=n*Y,k+=n*J,n=t[5],u+=n*L,d+=n*j,f+=n*D,h+=n*F,p+=n*U,m+=n*z,g+=n*Z,v+=n*q,y+=n*H,b+=n*V,w+=n*W,x+=n*$,_+=n*K,E+=n*G,k+=n*Y,S+=n*J,n=t[6],d+=n*L,f+=n*j,h+=n*D,p+=n*F,m+=n*U,g+=n*z,v+=n*Z,y+=n*q,b+=n*H,w+=n*V,x+=n*W,_+=n*$,E+=n*K,k+=n*G,S+=n*Y,A+=n*J,n=t[7],f+=n*L,h+=n*j,p+=n*D,m+=n*F,g+=n*U,v+=n*z,y+=n*Z,b+=n*q,w+=n*H,x+=n*V,_+=n*W,E+=n*$,k+=n*K,S+=n*G,A+=n*Y,M+=n*J,n=t[8],h+=n*L,p+=n*j,m+=n*D,g+=n*F,v+=n*U,y+=n*z,b+=n*Z,w+=n*q,x+=n*H,_+=n*V,E+=n*W,k+=n*$,S+=n*K,A+=n*G,M+=n*Y,C+=n*J,n=t[9],p+=n*L,m+=n*j,g+=n*D,v+=n*F,y+=n*U,b+=n*z,w+=n*Z,x+=n*q,_+=n*H,E+=n*V,k+=n*W,S+=n*$,A+=n*K,M+=n*G,C+=n*Y,I+=n*J,n=t[10],m+=n*L,g+=n*j,v+=n*D,y+=n*F,b+=n*U,w+=n*z,x+=n*Z,_+=n*q,E+=n*H,k+=n*V,S+=n*W,A+=n*$,M+=n*K,C+=n*G,I+=n*Y,T+=n*J,n=t[11],g+=n*L,v+=n*j,y+=n*D,b+=n*F,w+=n*U,x+=n*z,_+=n*Z,E+=n*q,k+=n*H,S+=n*V,A+=n*W,M+=n*$,C+=n*K,I+=n*G,T+=n*Y,P+=n*J,n=t[12],v+=n*L,y+=n*j,b+=n*D,w+=n*F,x+=n*U,_+=n*z,E+=n*Z,k+=n*q,S+=n*H,A+=n*V,M+=n*W,C+=n*$,I+=n*K,T+=n*G,P+=n*Y,O+=n*J,n=t[13],y+=n*L,b+=n*j,w+=n*D,x+=n*F,_+=n*U,E+=n*z,k+=n*Z,S+=n*q,A+=n*H,M+=n*V,C+=n*W,I+=n*$,T+=n*K,P+=n*G,O+=n*Y,R+=n*J,n=t[14],b+=n*L,w+=n*j,x+=n*D,_+=n*F,E+=n*U,k+=n*z,S+=n*Z,A+=n*q,M+=n*H,C+=n*V,I+=n*W,T+=n*$,P+=n*K,O+=n*G,R+=n*Y,N+=n*J,n=t[15],w+=n*L,x+=n*j,_+=n*D,E+=n*F,k+=n*U,S+=n*z,A+=n*Z,M+=n*q,C+=n*H,I+=n*V,T+=n*W,P+=n*$,O+=n*K,R+=n*G,N+=n*Y,B+=n*J,o+=38*x,a+=38*_,s+=38*E,c+=38*k,l+=38*S,u+=38*A,d+=38*M,f+=38*C,h+=38*I,p+=38*T,m+=38*P,g+=38*O,v+=38*R,y+=38*N,b+=38*B,i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,o+=i-1+37*(i-1),i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=f,e[8]=h,e[9]=p,e[10]=m,e[11]=g,e[12]=v,e[13]=y,e[14]=b,e[15]=w}function k(e,t){E(e,t,t)}function S(e,t){const r=a();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=253;n>=0;n--)k(r,r),2!==n&&4!==n&&E(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}function A(e,t){const r=a(),n=a(),i=a(),o=a(),s=a(),c=a(),l=a(),d=a(),f=a();_(r,e[1],e[0]),_(f,t[1],t[0]),E(r,r,f),x(n,e[0],e[1]),x(f,t[0],t[1]),E(n,n,f),E(i,e[3],t[3]),E(i,i,u),E(o,e[2],t[2]),x(o,o,o),_(s,n,r),_(c,o,i),x(l,o,i),x(d,n,r),E(e[0],s,c),E(e[1],d,l),E(e[2],l,c),E(e[3],s,d)}function M(e,t,r){for(let n=0;n<4;n++)g(e[n],t[n],r)}function C(e,t){const r=a(),n=a(),i=a();S(i,t[2]),E(r,t[0],i),E(n,t[1],i),v(e,n),e[31]^=w(r)<<7}function I(e,t,r){p(e[0],s),p(e[1],c),p(e[2],c),p(e[3],s);for(let n=255;n>=0;--n){const i=r[n/8|0]>>(7&n)&1;M(e,t,i),A(t,e),A(e,e),M(e,t,i)}}function T(e,t){const r=[a(),a(),a(),a()];p(r[0],d),p(r[1],f),p(r[2],c),E(r[3],d,f),I(e,r,t)}function P(e){if(e.length!==t.aP)throw new Error(`ed25519: seed must be ${t.aP} bytes`);const r=(0,i.hash)(e);r[0]&=248,r[31]&=127,r[31]|=64;const n=new Uint8Array(32),o=[a(),a(),a(),a()];T(o,r),C(n,o);const s=new Uint8Array(64);return s.set(e),s.set(n,32),{publicKey:n,secretKey:s}}t._w=P;const O=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function R(e,t){let r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>4)*O[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*O[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function N(e){const t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let r=0;r<64;r++)e[r]=0;R(e,t)}function B(e,t){const r=a(),n=a(),i=a(),o=a(),u=a(),d=a(),f=a();return p(e[2],c),function(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(e[1],t),k(i,e[1]),E(o,i,l),_(i,i,e[2]),x(o,e[2],o),k(u,o),k(d,u),E(f,d,u),E(r,f,i),E(r,r,o),function(e,t){const r=a();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=250;n>=0;n--)k(r,r),1!==n&&E(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}(r,r),E(r,r,i),E(r,r,o),E(r,r,o),E(e[0],r,o),k(n,e[0]),E(n,n,o),b(n,i)&&E(e[0],e[0],h),k(n,e[0]),E(n,n,o),b(n,i)?-1:(w(e[0])===t[31]>>7&&_(e[0],s,e[0]),E(e[3],e[0],e[1]),0)}t.Xx=function(e,t){const r=new Float64Array(64),n=[a(),a(),a(),a()],o=(0,i.hash)(e.subarray(0,32));o[0]&=248,o[31]&=127,o[31]|=64;const s=new Uint8Array(64);s.set(o.subarray(32),32);const c=new i.SHA512;c.update(s.subarray(32)),c.update(t);const l=c.digest();c.clean(),N(l),T(n,l),C(s,n),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const u=c.digest();N(u);for(let i=0;i<32;i++)r[i]=l[i];for(let i=0;i<32;i++)for(let e=0;e<32;e++)r[i+e]+=u[i]*o[e];return R(s.subarray(32),r),s}},24148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},45514:(e,t,r)=>{"use strict";var n=r(86555),i=r(38515),o=function(){function e(e,t,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=n.hmac(this._hash,r,t);this._hmac=new n.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(24148),i=r(11479),o=r(38515),a=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},5849:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(11479),i=r(38515);t.DIGEST_LENGTH=16;var o=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var i=e[4]|e[5]<<8;this._r[2]=7939&(n>>>10|i<<6);var o=e[6]|e[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var a=e[8]|e[9]<<8;this._r[4]=255&(o>>>4|a<<12),this._r[5]=a>>>1&8190;var s=e[10]|e[11]<<8;this._r[6]=8191&(a>>>14|s<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var l=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|l<<8),this._r[9]=l>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,i=this._h[0],o=this._h[1],a=this._h[2],s=this._h[3],c=this._h[4],l=this._h[5],u=this._h[6],d=this._h[7],f=this._h[8],h=this._h[9],p=this._r[0],m=this._r[1],g=this._r[2],v=this._r[3],y=this._r[4],b=this._r[5],w=this._r[6],x=this._r[7],_=this._r[8],E=this._r[9];r>=16;){var k=e[t+0]|e[t+1]<<8;i+=8191&k;var S=e[t+2]|e[t+3]<<8;o+=8191&(k>>>13|S<<3);var A=e[t+4]|e[t+5]<<8;a+=8191&(S>>>10|A<<6);var M=e[t+6]|e[t+7]<<8;s+=8191&(A>>>7|M<<9);var C=e[t+8]|e[t+9]<<8;c+=8191&(M>>>4|C<<12),l+=C>>>1&8191;var I=e[t+10]|e[t+11]<<8;u+=8191&(C>>>14|I<<2);var T=e[t+12]|e[t+13]<<8;d+=8191&(I>>>11|T<<5);var P=e[t+14]|e[t+15]<<8,O=0,R=O;R+=i*p,R+=o*(5*E),R+=a*(5*_),R+=s*(5*x),O=(R+=c*(5*w))>>>13,R&=8191,R+=l*(5*b),R+=u*(5*y),R+=d*(5*v),R+=(f+=8191&(T>>>8|P<<8))*(5*g);var N=O+=(R+=(h+=P>>>5|n)*(5*m))>>>13;N+=i*m,N+=o*p,N+=a*(5*E),N+=s*(5*_),O=(N+=c*(5*x))>>>13,N&=8191,N+=l*(5*w),N+=u*(5*b),N+=d*(5*y),N+=f*(5*v),O+=(N+=h*(5*g))>>>13,N&=8191;var B=O;B+=i*g,B+=o*m,B+=a*p,B+=s*(5*E),O=(B+=c*(5*_))>>>13,B&=8191,B+=l*(5*x),B+=u*(5*w),B+=d*(5*b),B+=f*(5*y);var L=O+=(B+=h*(5*v))>>>13;L+=i*v,L+=o*g,L+=a*m,L+=s*p,O=(L+=c*(5*E))>>>13,L&=8191,L+=l*(5*_),L+=u*(5*x),L+=d*(5*w),L+=f*(5*b);var j=O+=(L+=h*(5*y))>>>13;j+=i*y,j+=o*v,j+=a*g,j+=s*m,O=(j+=c*p)>>>13,j&=8191,j+=l*(5*E),j+=u*(5*_),j+=d*(5*x),j+=f*(5*w);var D=O+=(j+=h*(5*b))>>>13;D+=i*b,D+=o*y,D+=a*v,D+=s*g,O=(D+=c*m)>>>13,D&=8191,D+=l*p,D+=u*(5*E),D+=d*(5*_),D+=f*(5*x);var F=O+=(D+=h*(5*w))>>>13;F+=i*w,F+=o*b,F+=a*y,F+=s*v,O=(F+=c*g)>>>13,F&=8191,F+=l*m,F+=u*p,F+=d*(5*E),F+=f*(5*_);var U=O+=(F+=h*(5*x))>>>13;U+=i*x,U+=o*w,U+=a*b,U+=s*y,O=(U+=c*v)>>>13,U&=8191,U+=l*g,U+=u*m,U+=d*p,U+=f*(5*E);var z=O+=(U+=h*(5*_))>>>13;z+=i*_,z+=o*x,z+=a*w,z+=s*b,O=(z+=c*y)>>>13,z&=8191,z+=l*v,z+=u*g,z+=d*m,z+=f*p;var Z=O+=(z+=h*(5*E))>>>13;Z+=i*E,Z+=o*_,Z+=a*x,Z+=s*w,O=(Z+=c*b)>>>13,Z&=8191,Z+=l*y,Z+=u*v,Z+=d*g,Z+=f*m,i=R=8191&(O=(O=((O+=(Z+=h*p)>>>13)<<2)+O|0)+(R&=8191)|0),o=N+=O>>>=13,a=B&=8191,s=L&=8191,c=j&=8191,l=D&=8191,u=F&=8191,d=U&=8191,f=z&=8191,h=Z&=8191,t+=16,r-=16}this._h[0]=i,this._h[1]=o,this._h[2]=a,this._h[3]=s,this._h[4]=c,this._h[5]=l,this._h[6]=u,this._h[7]=d,this._h[8]=f,this._h[9]=h},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,i,o,a=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=r,r=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,a[0]=this._h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this._h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this._h[o]=this._h[o]&n|a[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var i=0;i=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const n=r(57774),i=r(96091),o=r(38515);function a(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaultRandomSource).randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=a,t.randomUint32=function(){const e=a(4,arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.defaultRandomSource),r=(0,i.readUint32LE)(e);return(0,o.wipe)(e),r};const s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let i="";const c=r.length,l=256-256%c;for(;e>0;){const t=a(Math.ceil(256*e/l),n);for(let n=0;n0;n++){const o=t[n];o1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;return c(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},12523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!==typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const n=r(38515);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=r(35883);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const n=r(12523),i=r(73901);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},54811:(e,t,r)=>{"use strict";var n=r(96091),i=r(38515);t.k=32,t.cn=64;var o=function(){function e(){this.digestLength=t.k,this.blockSize=t.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=s(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,a=t%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=o;var a=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(e,t,r,i,o){for(;o>=64;){for(var s=t[0],c=t[1],l=t[2],u=t[3],d=t[4],f=t[5],h=t[6],p=t[7],m=0;m<16;m++){var g=i+4*m;e[m]=n.readUint32BE(r,g)}for(m=16;m<64;m++){var v=e[m-2],y=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,b=((v=e[m-15])>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;e[m]=(y+e[m-7]|0)+(b+e[m-16]|0)}for(m=0;m<64;m++){y=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&h)|0)+(p+(a[m]+e[m]|0)|0)|0,b=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&l^c&l)|0;p=h,h=f,f=d,d=u+y|0,u=l,l=c,c=s,s=y+b|0}t[0]+=s,t[1]+=c,t[2]+=l,t[3]+=u,t[4]+=d,t[5]+=f,t[6]+=h,t[7]+=p,i+=64,o-=64}return i}t.vp=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},49764:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(96091),i=r(38515);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var o=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,a=t%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.stateHi),i.wipe(e.stateLo),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=o;var a=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function s(e,t,r,i,o,s,c){for(var l,u,d,f,h,p,m,g,v=r[0],y=r[1],b=r[2],w=r[3],x=r[4],_=r[5],E=r[6],k=r[7],S=i[0],A=i[1],M=i[2],C=i[3],I=i[4],T=i[5],P=i[6],O=i[7];c>=128;){for(var R=0;R<16;R++){var N=8*R+s;e[R]=n.readUint32BE(o,N),t[R]=n.readUint32BE(o,N+4)}for(R=0;R<80;R++){var B,L,j=v,D=y,F=b,U=w,z=x,Z=_,q=E,H=S,V=A,W=M,$=C,K=I,G=T,Y=P;if(h=65535&(u=O),p=u>>>16,m=65535&(l=k),g=l>>>16,h+=65535&(u=(I>>>14|x<<18)^(I>>>18|x<<14)^(x>>>9|I<<23)),p+=u>>>16,m+=65535&(l=(x>>>14|I<<18)^(x>>>18|I<<14)^(I>>>9|x<<23)),g+=l>>>16,h+=65535&(u=I&T^~I&P),p+=u>>>16,m+=65535&(l=x&_^~x&E),g+=l>>>16,l=a[2*R],h+=65535&(u=a[2*R+1]),p+=u>>>16,m+=65535&l,g+=l>>>16,l=e[R%16],p+=(u=t[R%16])>>>16,m+=65535&l,g+=l>>>16,m+=(p+=(h+=65535&u)>>>16)>>>16,h=65535&(u=f=65535&h|p<<16),p=u>>>16,m=65535&(l=d=65535&m|(g+=m>>>16)<<16),g=l>>>16,h+=65535&(u=(S>>>28|v<<4)^(v>>>2|S<<30)^(v>>>7|S<<25)),p+=u>>>16,m+=65535&(l=(v>>>28|S<<4)^(S>>>2|v<<30)^(S>>>7|v<<25)),g+=l>>>16,p+=(u=S&A^S&M^A&M)>>>16,m+=65535&(l=v&y^v&b^y&b),g+=l>>>16,B=65535&(m+=(p+=(h+=65535&u)>>>16)>>>16)|(g+=m>>>16)<<16,L=65535&h|p<<16,h=65535&(u=$),p=u>>>16,m=65535&(l=U),g=l>>>16,p+=(u=f)>>>16,m+=65535&(l=d),g+=l>>>16,y=j,b=D,w=F,x=U=65535&(m+=(p+=(h+=65535&u)>>>16)>>>16)|(g+=m>>>16)<<16,_=z,E=Z,k=q,v=B,A=H,M=V,C=W,I=$=65535&h|p<<16,T=K,P=G,O=Y,S=L,R%16===15)for(N=0;N<16;N++)l=e[N],h=65535&(u=t[N]),p=u>>>16,m=65535&l,g=l>>>16,l=e[(N+9)%16],h+=65535&(u=t[(N+9)%16]),p+=u>>>16,m+=65535&l,g+=l>>>16,d=e[(N+1)%16],h+=65535&(u=((f=t[(N+1)%16])>>>1|d<<31)^(f>>>8|d<<24)^(f>>>7|d<<25)),p+=u>>>16,m+=65535&(l=(d>>>1|f<<31)^(d>>>8|f<<24)^d>>>7),g+=l>>>16,d=e[(N+14)%16],p+=(u=((f=t[(N+14)%16])>>>19|d<<13)^(d>>>29|f<<3)^(f>>>6|d<<26))>>>16,m+=65535&(l=(d>>>19|f<<13)^(f>>>29|d<<3)^d>>>6),g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,e[N]=65535&m|g<<16,t[N]=65535&h|p<<16}h=65535&(u=S),p=u>>>16,m=65535&(l=v),g=l>>>16,l=r[0],p+=(u=i[0])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[0]=v=65535&m|g<<16,i[0]=S=65535&h|p<<16,h=65535&(u=A),p=u>>>16,m=65535&(l=y),g=l>>>16,l=r[1],p+=(u=i[1])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[1]=y=65535&m|g<<16,i[1]=A=65535&h|p<<16,h=65535&(u=M),p=u>>>16,m=65535&(l=b),g=l>>>16,l=r[2],p+=(u=i[2])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[2]=b=65535&m|g<<16,i[2]=M=65535&h|p<<16,h=65535&(u=C),p=u>>>16,m=65535&(l=w),g=l>>>16,l=r[3],p+=(u=i[3])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[3]=w=65535&m|g<<16,i[3]=C=65535&h|p<<16,h=65535&(u=I),p=u>>>16,m=65535&(l=x),g=l>>>16,l=r[4],p+=(u=i[4])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[4]=x=65535&m|g<<16,i[4]=I=65535&h|p<<16,h=65535&(u=T),p=u>>>16,m=65535&(l=_),g=l>>>16,l=r[5],p+=(u=i[5])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[5]=_=65535&m|g<<16,i[5]=T=65535&h|p<<16,h=65535&(u=P),p=u>>>16,m=65535&(l=E),g=l>>>16,l=r[6],p+=(u=i[6])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[6]=E=65535&m|g<<16,i[6]=P=65535&h|p<<16,h=65535&(u=O),p=u>>>16,m=65535&(l=k),g=l>>>16,l=r[7],p+=(u=i[7])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(p+=(h+=65535&u)>>>16)>>>16)>>>16,r[7]=k=65535&m|g<<16,i[7]=O=65535&h|p<<16,s+=128,c-=128}return s}t.hash=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},38515:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t{"use strict";t.gi=t.Au=t.KS=t.kz=void 0;const n=r(43226),i=r(38515);function o(e){const t=new Float64Array(16);if(e)for(let r=0;r=0;--o){const e=r[o>>>3]>>>(7&o)&1;l(i,a,e),l(p,m,e),u(g,i,p),d(i,i,p),u(p,a,m),d(a,a,m),h(m,g),h(v,i),f(i,p,i),f(p,a,g),u(g,i,p),d(i,i,p),h(a,i),d(p,m,v),f(i,p,s),u(i,i,m),f(p,p,i),f(i,m,v),f(m,a,n),h(a,g),l(i,a,e),l(p,m,e)}for(let o=0;o<16;o++)n[o+16]=i[o],n[o+32]=p[o],n[o+48]=a[o],n[o+64]=m[o];const y=n.subarray(32),b=n.subarray(16);!function(e,t){const r=o();for(let n=0;n<16;n++)r[n]=t[n];for(let n=253;n>=0;n--)h(r,r),2!==n&&4!==n&&f(r,r,t);for(let n=0;n<16;n++)e[n]=r[n]}(y,y),f(b,b,y);const w=new Uint8Array(32);return function(e,t){const r=o(),n=o();for(let i=0;i<16;i++)n[i]=t[i];c(n),c(n),c(n);for(let i=0;i<2;i++){r[0]=n[0]-65517;for(let t=1;t<15;t++)r[t]=n[t]-65535-(r[t-1]>>16&1),r[t-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,l(n,r,1-e)}for(let i=0;i<16;i++)e[2*i]=255&n[i],e[2*i+1]=n[i]>>8}(w,b),w}function m(e){return p(e,a)}function g(e){if(e.length!==t.KS)throw new Error(`x25519: seed must be ${t.KS} bytes`);const r=new Uint8Array(e);return{publicKey:m(r),secretKey:r}}t.Au=function(e){const t=(0,n.randomBytes)(32,e),r=g(t);return(0,i.wipe)(t),r},t.gi=function(e,r){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.length!==t.kz)throw new Error("X25519: incorrect secret key length");if(r.length!==t.kz)throw new Error("X25519: incorrect public key length");const i=p(e,r);if(n){let e=0;for(let t=0;t{"use strict";r.r(t),r.d(t,{detectEnv:()=>b,detectOS:()=>w,formatIOSMobile:()=>V,formatMobileRegistry:()=>Q,formatMobileRegistryEntry:()=>X,getClientMeta:()=>D,getCrypto:()=>B,getCryptoOrThrow:()=>N,getDappRegistryUrl:()=>J,getDocument:()=>I,getDocumentOrThrow:()=>C,getFromWindow:()=>A,getFromWindowOrThrow:()=>M,getLocal:()=>Z,getLocalStorage:()=>j,getLocalStorageOrThrow:()=>L,getLocation:()=>R,getLocationOrThrow:()=>O,getMobileLinkRegistry:()=>K,getMobileRegistryEntry:()=>$,getNavigator:()=>P,getNavigatorOrThrow:()=>T,getWalletRegistryUrl:()=>Y,isAndroid:()=>x,isBrowser:()=>S,isIOS:()=>_,isMobile:()=>E,isNode:()=>k,mobileLinkChoiceKey:()=>H,removeLocal:()=>q,safeJsonParse:()=>F,safeJsonStringify:()=>U,saveMobileLinkInfo:()=>W,setLocal:()=>z});var n=r(64731),i=r(87239),o=r(54501),a=function(){for(var e=0,t=0,r=arguments.length;t1)}function E(){return!!w()&&(x()||_())}function k(){const e=b();return!(!e||!e.name)&&"node"===e.name.toLowerCase()}function S(){return!k()&&!!P()}const A=i.getFromWindow,M=i.getFromWindowOrThrow,C=i.getDocumentOrThrow,I=i.getDocument,T=i.getNavigatorOrThrow,P=i.getNavigator,O=i.getLocationOrThrow,R=i.getLocation,N=i.getCryptoOrThrow,B=i.getCrypto,L=i.getLocalStorageOrThrow,j=i.getLocalStorage;function D(){return n.D()}const F=function(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}},U=function(e){return"string"===typeof e?e:JSON.stringify(e)};function z(e,t){const r=U(t),n=j();n&&n.setItem(e,r)}function Z(e){let t=null,r=null;const n=j();return n&&(r=n.getItem(e)),t=r?F(r):r,t}function q(e){const t=j();t&&t.removeItem(e)}const H="WALLETCONNECT_DEEPLINK_CHOICE";function V(e,t){const r=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${r}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function W(e){const t=e.href.split("?")[0];z(H,Object.assign(Object.assign({},e),{href:t}))}function $(e,t){return e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase())))[0]}function K(e,t){let r=e;return t&&(r=t.map((t=>$(e,t))).filter(Boolean)),r}const G="https://registry.walletconnect.com";function Y(){return G+"/api/v2/wallets"}function J(){return G+"/api/v2/dapps"}function X(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile";var r;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:null!==(r=e.image_url.sm)&&void 0!==r?r:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function Q(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile";return Object.values(e).filter((e=>!!e[t].universal||!!e[t].native)).map((e=>X(e,t)))}},69:(e,t,r)=>{"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},67648:(e,t,r)=>{"use strict";var n=r(54501);function i(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function o(){return"undefined"!==typeof n&&"undefined"!==typeof n.versions&&"undefined"!==typeof n.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=i,t.isNode=o,t.isBrowser=function(){return!i()&&!o()}},16419:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88001);n.__exportStar(r(69),t),n.__exportStar(r(67648),t)},88001:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>b,__asyncValues:()=>x,__await:()=>y,__awaiter:()=>u,__classPrivateFieldGet:()=>S,__classPrivateFieldSet:()=>A,__createBinding:()=>f,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>k,__importStar:()=>E,__makeTemplateObject:()=>_,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>a,__spread:()=>g,__spreadArrays:()=>v,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof y?Promise.resolve(e.value.v).then(c,l):u(o[0][2],e)}(i[e](t))}catch(r){u(o[0][3],r)}}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:y(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},79530:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});class n{}},23993:(e,t,r)=>{"use strict";r.r(t),r.d(t,{IEvents:()=>n.q});var n=r(79530)},49264:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEARTBEAT_EVENTS=t.HEARTBEAT_INTERVAL=void 0;const n=r(43750);t.HEARTBEAT_INTERVAL=n.FIVE_SECONDS,t.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},45101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(14358).__exportStar(r(49264),t)},24976:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartBeat=void 0;const n=r(14358),i=r(75121),o=r(43750),a=r(56269),s=r(45101);class c extends a.IHeartBeat{constructor(e){super(e),this.events=new i.EventEmitter,this.interval=s.HEARTBEAT_INTERVAL,this.interval=(null===e||void 0===e?void 0:e.interval)||s.HEARTBEAT_INTERVAL}static init(e){return n.__awaiter(this,void 0,void 0,(function*(){const t=new c(e);return yield t.init(),t}))}init(){return n.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return n.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),o.toMiliseconds(this.interval))}))}pulse(){this.events.emit(s.HEARTBEAT_EVENTS.pulse)}}t.HeartBeat=c},38589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(14358);n.__exportStar(r(24976),t),n.__exportStar(r(56269),t),n.__exportStar(r(45101),t)},23655:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHeartBeat=void 0;const n=r(23993);class i extends n.IEvents{constructor(e){super()}}t.IHeartBeat=i},56269:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(14358).__exportStar(r(23655),t)},14358:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>b,__asyncValues:()=>x,__await:()=>y,__awaiter:()=>u,__classPrivateFieldGet:()=>S,__classPrivateFieldSet:()=>A,__createBinding:()=>f,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>k,__importStar:()=>E,__makeTemplateObject:()=>_,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>a,__spread:()=>g,__spreadArrays:()=>v,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof y?Promise.resolve(e.value.v).then(c,l):u(o[0][2],e)}(i[e](t))}catch(r){u(o[0][3],r)}}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:y(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},2216:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},61331:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PINO_CUSTOM_CONTEXT_KEY=t.PINO_LOGGER_DEFAULTS=void 0,t.PINO_LOGGER_DEFAULTS={level:"info"},t.PINO_CUSTOM_CONTEXT_KEY="custom_context"},24526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const n=r(52848),i=n.__importDefault(r(93648));Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return i.default}}),n.__exportStar(r(61331),t),n.__exportStar(r(10221),t)},10221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateChildLogger=t.formatChildLoggerContext=t.getLoggerContext=t.setBrowserLoggerContext=t.getBrowserLoggerContext=t.getDefaultLoggerOptions=void 0;const n=r(61331);function i(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.PINO_CUSTOM_CONTEXT_KEY]||""}function o(e,t){return e[arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY]=t,e}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.PINO_CUSTOM_CONTEXT_KEY,r="";return r="undefined"===typeof e.bindings?i(e,t):e.bindings().context||"",r}function s(e,t){const r=a(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY);return r.trim()?`${r}/${t}`:t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null===e||void 0===e?void 0:e.level)||n.PINO_LOGGER_DEFAULTS.level})},t.getBrowserLoggerContext=i,t.setBrowserLoggerContext=o,t.getLoggerContext=a,t.formatChildLoggerContext=s,t.generateChildLogger=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY;const i=s(e,t,r);return o(e.child({context:i}),i,r)}},52848:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>b,__asyncValues:()=>x,__await:()=>y,__awaiter:()=>u,__classPrivateFieldGet:()=>S,__classPrivateFieldSet:()=>A,__createBinding:()=>f,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>k,__importStar:()=>E,__makeTemplateObject:()=>_,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>a,__spread:()=>g,__spreadArrays:()=>v,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof y?Promise.resolve(e.value.v).then(c,l):u(o[0][2],e)}(i[e](t))}catch(r){u(o[0][3],r)}}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:y(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},3505:()=>{},95446:()=>{},19100:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ENGINE_CONTEXT:()=>Mi,ENGINE_QUEUE_STATES:()=>Ti,ENGINE_RPC_OPTS:()=>Ci,HISTORY_CONTEXT:()=>wi,HISTORY_EVENTS:()=>bi,HISTORY_STORAGE_VERSION:()=>xi,METHODS_TO_VERIFY:()=>Oi,PROPOSAL_CONTEXT:()=>_i,PROPOSAL_EXPIRY:()=>Ei,PROPOSAL_EXPIRY_MESSAGE:()=>ki,REQUEST_CONTEXT:()=>Pi,SESSION_CONTEXT:()=>Si,SESSION_EXPIRY:()=>Ai,SESSION_REQUEST_EXPIRY_BOUNDARIES:()=>Ii,SIGN_CLIENT_CONTEXT:()=>hi,SIGN_CLIENT_DEFAULT:()=>mi,SIGN_CLIENT_EVENTS:()=>gi,SIGN_CLIENT_PROTOCOL:()=>di,SIGN_CLIENT_STORAGE_OPTIONS:()=>vi,SIGN_CLIENT_STORAGE_PREFIX:()=>pi,SIGN_CLIENT_VERSION:()=>fi,SignClient:()=>$i,WALLETCONNECT_DEEPLINK_CHOICE:()=>yi,default:()=>Wi});var n=r(75121),i=r.n(n);const o=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,a=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,s=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function c(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"===typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!==typeof e)return e;const r=e.trim();if('"'===e[0]&&'"'===e.at(-1)&&!e.includes("\\"))return r.slice(1,-1);if(r.length<=9){const e=r.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!s.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(o.test(e)||a.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,c)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}var u=r(30261).Buffer;function d(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem(t){var r;return null!==(r=e.get(t))&&void 0!==r?r:null},getItemRaw(t){var r;return null!==(r=e.get(t))&&void 0!==r?r:null},setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function b(){const e={mounts:{"":(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).driver||y()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=t=>{for(const r of e.mountpoints)if(t.startsWith(r))return{base:r,relativeKey:t.slice(r.length),driver:e.mounts[r]};return{base:"",relativeKey:t,driver:e.mounts[""]}},r=(t,r)=>e.mountpoints.filter((e=>e.startsWith(t)||r&&t.startsWith(e))).map((r=>({relativeBase:t.length>r.length?t.slice(r.length):void 0,mountpoint:r,driver:e.mounts[r]}))),n=(t,r)=>{if(e.watching){r=m(r);for(const n of e.watchListeners)n(t,r)}},i=async()=>{if(e.watching){for(const t in e.unwatch)await e.unwatch[t]();e.unwatch={},e.watching=!1}},o=(e,r,n)=>{const i=new Map,o=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const a of e){const e="string"===typeof a,n=m(e?a:a.key),i=e?void 0:a.value,s=e||!a.options?r:{...r,...a.options},c=t(n);o(c).items.push({key:n,value:i,relativeKey:c.relativeKey,options:s})}return Promise.all([...i.values()].map((e=>n(e)))).then((e=>e.flat()))},a={hasItem(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=m(e);const{relativeKey:n,driver:i}=t(e);return d(i.hasItem,n,r)},getItem(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=m(e);const{relativeKey:n,driver:i}=t(e);return d(i.getItem,n,r).then((e=>l(e)))},getItems:(e,t)=>o(e,t,(e=>e.driver.getItems?d(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:g(e.base,t.key),value:l(t.value)}))))):Promise.all(e.items.map((t=>d(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:l(e)})))))))),getItemRaw(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=m(e);const{relativeKey:n,driver:i}=t(e);return i.getItemRaw?d(i.getItemRaw,n,r):d(i.getItem,n,r).then((e=>function(e){return"string"!==typeof e?e:e.startsWith(p)?(h(),u.from(e.slice(p.length),"base64")):e}(e)))},async setItem(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===r)return a.removeItem(e);e=m(e);const{relativeKey:o,driver:s}=t(e);s.setItem&&(await d(s.setItem,o,f(r),i),s.watch||n("update",e))},async setItems(e,t){await o(e,t,(async e=>{e.driver.setItems&&await d(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:f(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>d(e.driver.setItem,t.relativeKey,f(t.value),t.options))))}))},async setItemRaw(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===r)return a.removeItem(e,i);e=m(e);const{relativeKey:o,driver:s}=t(e);if(s.setItemRaw)await d(s.setItemRaw,o,r,i);else{if(!s.setItem)return;await d(s.setItem,o,function(e){if("string"===typeof e)return e;h();const t=u.from(e).toString("base64");return p+t}(r),i)}s.watch||n("update",e)},async removeItem(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"===typeof r&&(r={removeMeta:r}),e=m(e);const{relativeKey:i,driver:o}=t(e);o.removeItem&&(await d(o.removeItem,i,r),(r.removeMeta||r.removeMata)&&await d(o.removeItem,i+"$",r),o.watch||n("remove",e))},async getMeta(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"===typeof r&&(r={nativeOnly:r}),e=m(e);const{relativeKey:n,driver:i}=t(e),o=Object.create(null);if(i.getMeta&&Object.assign(o,await d(i.getMeta,n,r)),!r.nativeOnly){const e=await d(i.getItem,n+"$",r).then((e=>l(e)));e&&"object"===typeof e&&("string"===typeof e.atime&&(e.atime=new Date(e.atime)),"string"===typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(o,e))}return o},setMeta(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.setItem(e+"$",t,r)},removeMeta(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.removeItem(e+"$",t)},async getKeys(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=v(e);const n=r(e,!0);let i=[];const o=[];for(const r of n){const e=(await d(r.driver.getKeys,r.relativeBase,t)).map((e=>r.mountpoint+m(e))).filter((e=>!i.some((t=>e.startsWith(t)))));o.push(...e),i=[r.mountpoint,...i.filter((e=>!e.startsWith(r.mountpoint)))]}return e?o.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):o.filter((e=>!e.endsWith("$")))},async clear(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=v(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return d(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const r=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(r.map((r=>e.driver.removeItem(r,t))))}})))},async dispose(){await Promise.all(Object.values(e.mounts).map((e=>x(e))))},watch:async t=>(await(async()=>{if(!e.watching){e.watching=!0;for(const t in e.mounts)e.unwatch[t]=await w(e.mounts[t],n,t)}})(),e.watchListeners.push(t),async()=>{e.watchListeners=e.watchListeners.filter((e=>e!==t)),0===e.watchListeners.length&&await i()}),async unwatch(){e.watchListeners=[],await i()},mount(t,r){if((t=v(t))&&e.mounts[t])throw new Error(`already mounted at ${t}`);return t&&(e.mountpoints.push(t),e.mountpoints.sort(((e,t)=>t.length-e.length))),e.mounts[t]=r,e.watching&&Promise.resolve(w(r,n,t)).then((r=>{e.unwatch[t]=r})).catch(console.error),a},async unmount(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(t=v(t))&&e.mounts[t]&&(e.watching&&t in e.unwatch&&(e.unwatch[t](),delete e.unwatch[t]),r&&await x(e.mounts[t]),e.mountpoints=e.mountpoints.filter((e=>e!==t)),delete e.mounts[t])},getMount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=m(e)+":";const r=t(e);return{driver:r.driver,base:r.base}},getMounts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=m(e);return r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return a}function w(e,t,r){return e.watch?e.watch(((e,n)=>t(e,r+n))):()=>{}}async function x(e){"function"===typeof e.dispose&&await d(e.dispose)}function _(e){return new Promise(((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)}))}function E(e,t){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);const n=_(r);return(e,r)=>n.then((n=>r(n.transaction(t,e).objectStore(t))))}let k;function S(){return k||(k=E("keyval-store","keyval")),k}function A(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:S())("readonly",(t=>_(t.get(e))))}function M(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},_(e.transaction)}const C=e=>JSON.stringify(e,((e,t)=>"bigint"===typeof t?t.toString()+"n":t)),I=e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"===typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function T(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return I(e)}catch(t){return e}}function P(e){return"string"===typeof e?e:C(e)||""}const O="idb-keyval";var R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.base&&e.base.length>0?`${e.base}:`:"",r=e=>t+e;let n;return e.dbName&&e.storeName&&(n=E(e.dbName,e.storeName)),{name:O,options:e,hasItem:async e=>!(typeof await A(r(e),n)>"u"),async getItem(e){var t;return null!==(t=await A(r(e),n))&&void 0!==t?t:null},setItem:(e,t)=>function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:S())("readwrite",(r=>(r.put(t,e),_(r.transaction))))}(r(e),t,n),removeItem:e=>function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:S())("readwrite",(t=>(t.delete(e),_(t.transaction))))}(r(e),n),getKeys:()=>function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:S())("readonly",(e=>{if(e.getAllKeys)return _(e.getAllKeys());const t=[];return M(e,(e=>t.push(e.key))).then((()=>t))}))}(n),clear:()=>function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:S())("readwrite",(e=>(e.clear(),_(e.transaction))))}(n)}};class N{constructor(){this.indexedDb=b({driver:R({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,P(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var B=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{},L={exports:{}};function j(e){var t;return[e[0],T(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof B<"u"&&B.localStorage?L.exports=B.localStorage:typeof window<"u"&&window.localStorage?L.exports=window.localStorage:L.exports=new t}();class D{constructor(){this.localStorage=L.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(j)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return T(t)}async setItem(e,t){this.localStorage.setItem(e,P(t))}async removeItem(e){this.localStorage.removeItem(e)}}const F=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};class U{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new D;this.storage=e;try{(async(e,t,r)=>{const n="wc_storage_version",i=await t.getItem(n);if(i&&i>=1)return void r(t);const o=await e.getKeys();if(!o.length)return void r(t);const a=[];for(;o.length;){const r=o.shift();if(!r)continue;const n=r.toLowerCase();if(n.includes("wc@")||n.includes("walletconnect")||n.includes("wc_")||n.includes("wallet_connect")){const n=await e.getItem(r);await t.setItem(r,n),a.push(r)}}await t.setItem(n,1),r(t),F(e,a)})(e,new N,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}var z=r(38589),Z=r(24526),q=r(79530);class H extends q.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class V extends q.q{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class W{constructor(e,t){this.logger=e,this.core=t}}class $ extends q.q{constructor(e,t){super(),this.relayer=e,this.logger=t}}class K extends q.q{constructor(e){super()}}class G{constructor(e,t,r,n){this.core=e,this.logger=t,this.name=r}}class Y extends q.q{constructor(e,t){super(),this.relayer=e,this.logger=t}}class J extends q.q{constructor(e,t){super(),this.core=e,this.logger=t}}class X{constructor(e,t){this.projectId=e,this.logger=t}}class Q{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class ee{constructor(e){this.client=e}}var te=r(95714),re=r(43226),ne=r(43750);const ie="EdDSA",oe="JWT",ae=".",se="base64url",ce="utf8",le="utf8",ue=":",de="did",fe="key",he="base58btc",pe="z",me="K36",ge=32;var ve=r(49661),ye=r(50055),be=r(75345);const we=e=>JSON.stringify(e,((e,t)=>"bigint"===typeof t?t.toString()+"n":t));function xe(e){return(0,ye.B)((0,be.m)("string"===typeof(t=e)?t:we(t)||"",ce),se);var t}function _e(e){const t=(0,be.m)(me,he),r=pe+(0,ye.B)((0,ve.z)([t,e]),he);return[de,fe,r].join(ue)}function Ee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,re.randomBytes)(ge);return te._w(e)}async function ke(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(0,ne.fromMiliseconds)(Date.now());const o={alg:ie,typ:oe},a={iss:_e(n.publicKey),sub:e,aud:t,iat:i,exp:i+r},s=(c={header:o,payload:a},(0,be.m)([xe(c.header),xe(c.payload)].join(ae),le));var c;return function(e){return[xe(e.header),xe(e.payload),(t=e.signature,(0,ye.B)(t,se))].join(ae);var t}({header:o,payload:a,signature:te.Xx(n.secretKey,s)})}r(95446);var Se=r(6588),Ae=r(68756);const Me="INTERNAL_ERROR",Ce="SERVER_ERROR",Ie=[-32700,-32600,-32601,-32602,-32603],Te={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[Me]:{code:-32603,message:"Internal error"},[Ce]:{code:-32e3,message:"Server error"}},Pe=Ce;function Oe(e){return Ie.includes(e)}function Re(e){return Object.keys(Te).includes(e)?Te[e]:Te[Pe]}function Ne(e){const t=Object.values(Te).find((t=>t.code===e));return t||Te[Pe]}var Be=r(16419);function Le(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function je(){return BigInt(Le(arguments.length>0&&void 0!==arguments[0]?arguments[0]:6))}function De(e,t,r){return{id:r||Le(),jsonrpc:"2.0",method:e,params:t}}function Fe(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Ue(e,t,r){return{id:e,jsonrpc:"2.0",error:ze(t,r)}}function ze(e,t){return"undefined"===typeof e?Re(Me):("string"===typeof e&&(e=Object.assign(Object.assign({},Re(Ce)),{message:e})),"undefined"!==typeof t&&(e.data=t),Oe(e.code)&&(e=Ne(e.code)),e)}class Ze{}class qe extends Ze{constructor(){super()}}class He extends qe{constructor(e){super()}}const Ve="^wss?:";function We(e,t){const r=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return"undefined"!==typeof r&&new RegExp(t).test(r)}function $e(e){return We(e,Ve)}function Ke(e){return"object"===typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function Ge(e){return Ke(e)&&"method"in e}function Ye(e){return Ke(e)&&(Je(e)||Xe(e))}function Je(e){return"result"in e}function Xe(e){return"error"in e}class Qe extends He{constructor(e){super(e),this.events=new n.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(De(e.method,e.params||[],e.id||je().toString()),t)}async requestStrict(e,t){return new Promise((async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(i){n(i)}this.events.on(`${e.id}`,(e=>{Xe(e)?n(e.error):r(e.result)}));try{await this.connection.send(e,t)}catch(i){n(i)}}))}setConnection(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection}onPayload(e){this.events.emit("payload",e),Ye(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"===typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const et=e=>JSON.stringify(e,((e,t)=>"bigint"===typeof t?t.toString()+"n":t)),tt=e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"===typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};const rt=e=>e.split("?")[0],nt=typeof WebSocket<"u"?WebSocket:typeof r.g<"u"&&typeof r.g.WebSocket<"u"?r.g.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:r(2216);class it{constructor(e){if(this.url=e,this.events=new n.EventEmitter,this.registering=!1,!$e(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send("string"===typeof(t=e)?t:et(t)||"")}catch(r){this.onError(e.id,r)}var t}register(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;if(!$e(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const i=new URLSearchParams(e).get("origin"),o=(0,Be.isReactNative)()?{headers:{origin:i}}:{rejectUnauthorized:(s=e,!new RegExp("wss?://localhost(:d{2,5})?").test(s))},a=new nt(e,[],o);var s;typeof WebSocket<"u"||typeof r.g<"u"&&typeof r.g.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?a.onerror=e=>{const t=e;n(this.emitError(t.error))}:a.on("error",(e=>{n(this.emitError(e))})),a.onopen=()=>{this.onOpen(a),t(a)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?function(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return tt(e)}catch(t){return e}}(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),n=Ue(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return function(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}(e,rt(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error((null===e||void 0===e?void 0:e.message)||`WebSocket connection failed for host: ${rt(this.url)}`));return this.events.emit("register_error",t),t}}var ot=r(81629),at=r.n(ot);var st=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,a=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var d=0,f=o-1;(0!==u||d>>0,a[f]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(n+(o-h)),m=n;h!==o;)p[m++]=a[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var a=(o-i)*u+1>>>0,l=new Uint8Array(a);i!==o;){for(var d=t[i],f=0,h=a-1;(0!==d||f>>0,l[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");n=f,i++}for(var p=a-n;p!==a&&0===l[p];)p++;for(var m=c.repeat(r);p{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class ut{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class dt{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return ht(this,e)}}class ft{constructor(e){this.decoders=e}or(e){return ht(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const ht=(e,t)=>new ft({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class pt{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new ut(e,t,r),this.decoder=new dt(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const mt=e=>{let{name:t,prefix:r,encode:n,decode:i}=e;return new pt(t,r,n,i)},gt=e=>{let{prefix:t,name:r,alphabet:n}=e;const{encode:i,decode:o}=ct(n,r);return mt({prefix:t,name:r,encode:i,decode:e=>lt(o(e))})},vt=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:i}=e;return mt({prefix:r,name:t,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)a-=r,o+=t[i&s>>a];if(a&&(o+=t[i&s<((e,t,r,n)=>{const i={};for(let u=0;u=8&&(s-=8,a[l++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(e,i,n,t)})},yt=mt({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var bt=Object.freeze({__proto__:null,identity:yt});const wt=vt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var xt=Object.freeze({__proto__:null,base2:wt});const _t=vt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Et=Object.freeze({__proto__:null,base8:_t});const kt=gt({prefix:"9",name:"base10",alphabet:"0123456789"});var St=Object.freeze({__proto__:null,base10:kt});const At=vt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Mt=vt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Ct=Object.freeze({__proto__:null,base16:At,base16upper:Mt});const It=vt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Tt=vt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Pt=vt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Ot=vt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Rt=vt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Nt=vt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Bt=vt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Lt=vt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),jt=vt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Dt=Object.freeze({__proto__:null,base32:It,base32upper:Tt,base32pad:Pt,base32padupper:Ot,base32hex:Rt,base32hexupper:Nt,base32hexpad:Bt,base32hexpadupper:Lt,base32z:jt});const Ft=gt({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ut=gt({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var zt=Object.freeze({__proto__:null,base36:Ft,base36upper:Ut});const Zt=gt({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),qt=gt({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Ht=Object.freeze({__proto__:null,base58btc:Zt,base58flickr:qt});const Vt=vt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Wt=vt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),$t=vt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Kt=vt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Gt=Object.freeze({__proto__:null,base64:Vt,base64pad:Wt,base64url:$t,base64urlpad:Kt});const Yt=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),Jt=Yt.reduce(((e,t,r)=>(e[r]=t,e)),[]),Xt=Yt.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]);const Qt=mt({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Jt[t]),"")},decode:function(e){const t=[];for(const r of e){const e=Xt[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var er=Object.freeze({__proto__:null,base256emoji:Qt}),tr=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=ir;)r[n++]=255&t|rr,t/=128;for(;t&nr;)r[n++]=255&t|rr,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},rr=128,nr=-128,ir=Math.pow(2,31);var or=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(n&sr)<=ar);return e.bytes=a-r,i},ar=128,sr=127;var cr=Math.pow(2,7),lr=Math.pow(2,14),ur=Math.pow(2,21),dr=Math.pow(2,28),fr=Math.pow(2,35),hr=Math.pow(2,42),pr=Math.pow(2,49),mr=Math.pow(2,56),gr=Math.pow(2,63),vr={encode:tr,decode:or,encodingLength:function(e){return e2&&void 0!==arguments[2]?arguments[2]:0;return vr.encode(e,t,r),t},br=e=>vr.encodingLength(e),wr=(e,t)=>{const r=t.byteLength,n=br(e),i=n+br(r),o=new Uint8Array(i+r);return yr(e,o,0),yr(r,o,n),o.set(t,i),new xr(e,r,t,o)};class xr{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const _r=e=>{let{name:t,code:r,encode:n}=e;return new Er(t,r,n)};class Er{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?wr(this.code,t):t.then((e=>wr(this.code,e)))}throw Error("Unknown type, must be binary type")}}const kr=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Sr=_r({name:"sha2-256",code:18,encode:kr("SHA-256")}),Ar=_r({name:"sha2-512",code:19,encode:kr("SHA-512")});Object.freeze({__proto__:null,sha256:Sr,sha512:Ar});const Mr=lt,Cr={code:0,name:"identity",encode:Mr,digest:e=>wr(0,Mr(e))};Object.freeze({__proto__:null,identity:Cr});new TextEncoder,new TextDecoder;const Ir={...bt,...xt,...Et,...St,...Ct,...Dt,...zt,...Ht,...Gt,...er};function Tr(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Pr(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const Or=Pr("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Rr=Pr("ascii","a",(e=>{let t="a";for(let r=0;r{const t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Tr(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;r{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=(0,Z.generateChildLogger)(t,this.name)}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,(0,Se.mapToObj)(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?(0,Se.objToMap)(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class An{constructor(e,t,r){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>{this.isInitialized();return _e(Ee(await this.getClientSeed()).publicKey)},this.generateKeyPair=()=>{this.isInitialized();const e=(0,Se.generateKeyPair)();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=Ee(await this.getClientSeed()),r=(0,Se.generateRandomBytes32)(),n=Ur;return await ke(r,e,n,t)},this.generateSharedKey=(e,t,r)=>{this.isInitialized();const n=this.getPrivateKey(e),i=(0,Se.deriveSymKey)(n,t);return this.setSymKey(i,r)},this.setSymKey=async(e,t)=>{this.isInitialized();const r=t||(0,Se.hashKey)(e);return await this.keychain.set(r,e),r},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,r)=>{this.isInitialized();const n=(0,Se.validateEncoding)(r),i=P(t);if((0,Se.isTypeOneEnvelope)(n)){const t=n.senderPublicKey,r=n.receiverPublicKey;e=await this.generateSharedKey(t,r)}const o=this.getSymKey(e),{type:a,senderPublicKey:s}=n;return(0,Se.encrypt)({type:a,symKey:o,message:i,senderPublicKey:s})},this.decode=async(e,t,r)=>{this.isInitialized();const n=(0,Se.validateDecoding)(t,r);if((0,Se.isTypeOneEnvelope)(n)){const t=n.receiverPublicKey,r=n.senderPublicKey;e=await this.generateSharedKey(t,r)}try{const r=this.getSymKey(e);return T((0,Se.decrypt)({symKey:r,encoded:t}))}catch(U){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(U)}},this.getPayloadType=e=>{const t=(0,Se.deserialize)(e);return(0,Se.decodeTypeByte)(t.type)},this.getPayloadSenderPublicKey=e=>{const t=(0,Se.deserialize)(e);return t.senderPublicKey?(0,Ae.BB)(t.senderPublicKey,Se.BASE16):void 0},this.core=e,this.logger=(0,Z.generateChildLogger)(t,this.name),this.keychain=r||new Sn(this.core,this.logger)}get context(){return(0,Z.getLoggerContext)(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Fr)}catch{e=(0,Se.generateRandomBytes32)(),await this.keychain.set(Fr,e)}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=Nr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):Tr(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Mn extends W{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Lr,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const r=(0,Se.hashMessage)(t);let n=this.messages.get(e);return typeof n>"u"&&(n={}),typeof n[r]<"u"||(n[r]=t,this.messages.set(e,n),await this.persist()),r},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>{this.isInitialized();return typeof this.get(e)[(0,Se.hashMessage)(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=(0,Z.generateChildLogger)(e,this.name),this.core=t}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,(0,Se.mapToObj)(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?(0,Se.objToMap)(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Cn extends ${constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new n.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,ne.toMiliseconds)(ne.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,r)=>{var n;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});try{const i=(null===r||void 0===r?void 0:r.ttl)||zr,o=(0,Se.getRelayProtocolName)(r),a=(null===r||void 0===r?void 0:r.prompt)||!1,s=(null===r||void 0===r?void 0:r.tag)||0,c=(null===r||void 0===r?void 0:r.id)||je().toString(),l={topic:e,message:t,opts:{ttl:i,relay:o,prompt:a,tag:s,id:c}},u=setTimeout((()=>this.queue.set(c,l)),this.publishTimeout);try{await await(0,Se.createExpiringPromise)(this.rpcPublish(e,t,i,o,a,s,c),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(c),this.relayer.events.emit(Yr,l)}catch($){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(n=null===r||void 0===r?void 0:r.internal)&&n.throwOnFailedPublish)throw this.removeRequestFromQueue(c),$;return}finally{clearTimeout(u)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}})}catch(W){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(W),W}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=(0,Z.generateChildLogger)(t,this.name),this.registerEventListeners()}get context(){return(0,Z.getLoggerContext)(this.logger)}rpcPublish(e,t,r,n,i,o,a){var s,c,l,u;const d={method:(0,Se.getRelayProtocolApi)(n.protocol).publish,params:{topic:e,message:t,ttl:r,prompt:i,tag:o},id:a};return(0,Se.isUndefined)(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),(0,Se.isUndefined)(null==(l=d.params)?void 0:l.tag)&&(null==(u=d.params)||delete u.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:r,opts:n}=e;await this.publish(t,r,n)}))}registerEventListeners(){this.relayer.core.heartbeat.on(z.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(Gr);this.checkQueue()})),this.relayer.on(Vr,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class In{constructor(){this.map=new Map,this.set=(e,t)=>{const r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,t))return;const n=r.filter((e=>e!==t));n.length?this.map.set(e,n):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Tn=Object.defineProperty,Pn=Object.defineProperties,On=Object.getOwnPropertyDescriptors,Rn=Object.getOwnPropertySymbols,Nn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Ln=(e,t,r)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jn=(e,t)=>{for(var r in t||(t={}))Nn.call(t,r)&&Ln(e,r,t[r]);if(Rn)for(var r of Rn(t))Bn.call(t,r)&&Ln(e,r,t[r]);return e},Dn=(e,t)=>Pn(e,On(t));class Fn extends Y{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new In,this.events=new n.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Lr,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const r=(0,Se.getRelayProtocolName)(t),n={topic:e,relay:r};this.pending.set(e,n);const i=await this.rpcSubscribe(e,r);return this.onSubscribe(i,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(H){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(H),H}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof(null===t||void 0===t?void 0:t.id)<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>!!this.topics.includes(e)||await new Promise(((t,r)=>{const n=new ne.Watch;n.start(this.pendingSubscriptionWatchLabel);const i=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),t(!0)),n.elapsed(this.pendingSubscriptionWatchLabel)>=sn&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1)),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=(0,Z.generateChildLogger)(t,this.name),this.clientId=""}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const r=this.topicMap.get(e);await Promise.all(r.map((async r=>await this.unsubscribeById(e,r,t))))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{const n=(0,Se.getRelayProtocolName)(r);await this.rpcUnsubscribe(e,t,n);const i=(0,Se.getSdkError)("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(n){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(n),n}}async rpcSubscribe(e,t){const r={method:(0,Se.getRelayProtocolApi)(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await(0,Se.createExpiringPromise)(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Gr)}return(0,Se.hashMessage)(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,r={method:(0,Se.getRelayProtocolApi)(t.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await(0,Se.createExpiringPromise)(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Gr)}}rpcUnsubscribe(e,t,r){const n={method:(0,Se.getRelayProtocolApi)(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(e,t){this.setSubscription(e,Dn(jn({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,jn({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,jn({},t)),this.topicMap.set(t.topic,e),this.events.emit(rn,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(nn,Dn(jn({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(on)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=(0,Se.getInternalError)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);(0,Se.isValidArray)(t)&&this.onBatchSubscribe(t.map(((t,r)=>Dn(jn({},e[r]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(z.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(Wr,(async()=>{await this.onConnect()})),this.relayer.on($r,(()=>{this.onDisconnect()})),this.events.on(rn,(async e=>{const t=rn;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(nn,(async e=>{const t=nn;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}}var Un=Object.defineProperty,zn=Object.getOwnPropertySymbols,Zn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,Hn=(e,t,r)=>t in e?Un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class Vn extends K{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new n.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async e=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(e)}catch(t){throw this.logger.debug("Failed to Publish Request"),this.logger.error(t),t}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(Wr)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(Kr,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Jr,this.onPayloadHandler),this.provider.on(Xr,this.onConnectHandler),this.provider.on(Qr,this.onDisconnectHandler),this.provider.on(en,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,Z.generateChildLogger)(e.logger,this.name):(0,Z.pino)((0,Z.getDefaultLoggerOptions)({level:e.logger||"error"})),this.messages=new Mn(this.logger,e.core),this.subscriber=new Fn(this,this.logger),this.publisher=new Cn(this,this.logger),this.relayUrl=(null===e||void 0===e?void 0:e.relayUrl)||Zr,this.projectId=e.projectId,this.bundleId=(0,Se.getBundleId)(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${qr}...`),await this.restartTransport(qr)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return(0,Z.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var r;this.isInitialized();let n,i=(null==(r=this.subscriber.topicMap.get(e))?void 0:r[0])||"";if(i)return i;const o=t=>{t.topic===e&&(this.subscriber.off(rn,o),n())};return await Promise.all([new Promise((e=>{n=e,this.subscriber.on(rn,o)})),new Promise((async r=>{i=await this.subscriber.subscribe(e,t),r()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await(0,Se.createExpiringPromise)(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(an,(()=>{e()}))})),new Promise((async(e,t)=>{try{await(0,Se.createExpiringPromise)(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(r){return void t(r)}e()}))])}catch(t){this.logger.error(t);const e=t;if(!this.isConnectionStalled(e.message))throw t;this.provider.events.emit(Qr)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await(0,Se.isOnline)())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Qe(new it((0,Se.formatRelayRpcUrl)({sdkVersion:"2.10.6",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:r}=e;await this.messages.set(t,r)}async shouldIgnoreMessageEvent(e){const{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.debug(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const n=this.messages.has(t,r);return n&&this.logger.debug(`Ignoring duplicate message: ${r}`),n}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),Ge(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:r,message:n,publishedAt:i}=t.data,o={topic:r,message:n,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var r in t||(t={}))Zn.call(t,r)&&Hn(e,r,t[r]);if(zn)for(var r of zn(t))qn.call(t,r)&&Hn(e,r,t[r]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else Ye(e)&&this.events.emit(Vr,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Hr,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Fe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(Jr,this.onPayloadHandler),this.provider.off(Xr,this.onConnectHandler),this.provider.off(Qr,this.onDisconnectHandler),this.provider.off(en,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Gr,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await(0,Se.isOnline)();(0,Se.subscribeToNetworkChange)((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit($r),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),(0,ne.toMiliseconds)(tn)))}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}}var Wn=Object.defineProperty,$n=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,Yn=(e,t,r)=>t in e?Wn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jn=(e,t)=>{for(var r in t||(t={}))Kn.call(t,r)&&Yn(e,r,t[r]);if($n)for(var r of $n(t))Gn.call(t,r)&&Yn(e,r,t[r]);return e};class Xn extends G{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lr,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;super(e,t,r,n),this.core=e,this.logger=t,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Lr,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!(0,Se.isUndefined)(e)?this.map.set(this.getKey(e),e):(0,Se.isProposalStruct)(e)?this.map.set(e.id,e):(0,Se.isSessionStruct)(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((r=>at()(t[r],e[r]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const r=Jn(Jn({},this.getData(e)),t);this.map.set(e,r),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=(0,Z.generateChildLogger)(t,this.name),this.storagePrefix=n,this.getKey=i}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=(0,Se.getInternalError)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Qn{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new(i()),this.initialized=!1,this.storagePrefix=Lr,this.ignoredPayloadTypes=[Se.TYPE_1],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=e=>{let{methods:t}=e;this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...t])]},this.create=async()=>{this.isInitialized();const e=(0,Se.generateRandomBytes32)(),t=await this.core.crypto.setSymKey(e),r=(0,Se.calcExpiry)(ne.FIVE_MINUTES),n={protocol:"irn"},i={topic:t,expiry:r,relay:n,active:!1},o=(0,Se.formatUri)({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:n});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,r),{topic:t,uri:o}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:r,relay:n}=(0,Se.parseUri)(e.uri);let i;if(this.pairings.keys.includes(t)&&(i=this.pairings.get(t),i.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const o=(0,Se.calcExpiry)(ne.FIVE_MINUTES),a={topic:t,relay:n,expiry:o,active:!1};return await this.pairings.set(t,a),this.core.expirer.set(t,o),e.activatePairing&&await this.activate({topic:t}),this.events.emit(ln,a),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(r,t),await this.core.relayer.subscribe(t,{relay:n})),a},this.activate=async e=>{let{topic:t}=e;this.isInitialized();const r=(0,Se.calcExpiry)(ne.THIRTY_DAYS);await this.pairings.update(t,{active:!0,expiry:r}),this.core.expirer.set(t,r)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=(0,Se.createDelayedPromise)();this.events.once((0,Se.engineEvent)("pairing_ping",e),(e=>{let{error:t}=e;t?i(t):n()})),await r()}},this.updateExpiry=async e=>{let{topic:t,expiry:r}=e;this.isInitialized(),await this.pairings.update(t,{expiry:r})},this.updateMetadata=async e=>{let{topic:t,metadata:r}=e;this.isInitialized(),await this.pairings.update(t,{peerMetadata:r})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",(0,Se.getSdkError)("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,r)=>{const n=De(t,r),i=await this.core.crypto.encode(e,n),o=cn[t].req;return this.core.history.set(e,n),this.core.relayer.publish(e,i,o),n.id},this.sendResult=async(e,t,r)=>{const n=Fe(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),a=cn[o.request.method].res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(n)},this.sendError=async(e,t,r)=>{const n=Ue(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),a=cn[o.request.method]?cn[o.request.method].res:cn.unregistered_method.res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(n)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,(0,Se.getSdkError)("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>(0,Se.isExpired)(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return this.onPairingPingRequest(t,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,r);default:return this.onUnknownRpcMethodRequest(t,r)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===n?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(n)},this.onPairingPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit(fn,{id:r,topic:e})}catch(n){await this.sendError(r,e,n),this.logger.error(n)}},this.onPairingPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{Je(t)?this.events.emit((0,Se.engineEvent)("pairing_ping",r),{}):Xe(t)&&this.events.emit((0,Se.engineEvent)("pairing_ping",r),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(dn,{id:r,topic:e})}catch(n){await this.sendError(r,e,n),this.logger.error(n)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:r,method:n}=t;try{if(this.registeredMethods.includes(n))return;const t=(0,Se.getSdkError)("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,e,t),this.logger.error(t)}catch(W){await this.sendError(r,e,W),this.logger.error(W)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error((0,Se.getSdkError)("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!(0,Se.isValidUrl)(e.uri)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const r=(0,Se.parseUri)(e.uri);if(null==(t=null===r||void 0===r?void 0:r.relay)||!t.protocol){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==r||!r.symKey){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}},this.isValidPing=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!(0,Se.isValidString)(e,!1)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if((0,Se.isExpired)(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=(0,Se.getInternalError)("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=(0,Z.generateChildLogger)(t,this.name),this.pairings=new Xn(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Z.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Hr,(async e=>{const{topic:t,message:r}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const n=await this.core.crypto.decode(t,r);try{Ge(n)?(this.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):Ye(n)&&(await this.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.core.history.delete(t,n.id))}catch(H){this.logger.error(H)}}))}registerExpirerEvents(){this.core.expirer.on(bn,(async e=>{const{topic:t}=(0,Se.parseExpirerTarget)(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(un,{topic:t}))}))}}class ei extends V{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new n.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Lr,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;const n={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:(0,Se.calcExpiry)(ne.THIRTY_DAYS)};this.records.set(n.id,n),this.events.emit(hn,n)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=Xe(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(pn,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((r=>{if(r.topic===e){if(typeof t<"u"&&r.id!==t)return;this.records.delete(r.id),this.events.emit(mn,r)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,Z.generateChildLogger)(t,this.name)}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const r={topic:t.topic,request:De(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(gn)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=(0,Se.getInternalError)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(hn,(e=>{const t=hn;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(pn,(e=>{const t=pn;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(mn,(e=>{const t=mn;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(z.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{(0,ne.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class ti extends J{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new n.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Lr,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const r=this.formatTarget(e),n={target:r,expiry:t};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(vn,{target:r,expiration:n})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(yn,{target:t,expiration:r})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,Z.generateChildLogger)(t,this.name)}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return(0,Se.formatTopicTarget)(e);if("number"==typeof e)return(0,Se.formatIdTarget)(e);const{message:t}=(0,Se.getInternalError)("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(wn)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=(0,Se.getInternalError)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:r}=t;(0,ne.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(bn,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(z.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(vn,(e=>{const t=vn;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(bn,(e=>{const t=bn;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(yn,(e=>{const t=yn;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class ri extends X{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=xn,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||(0,Se.isReactNative)()||!(0,Se.isBrowser)())return;const t=this.getVerifyUrl(null===e||void 0===e?void 0:e.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(H){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(H)}if(!this.initialized){this.removeIframe(),this.verifyUrl=En;try{await this.createIframe()}catch(H){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(H),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(null===e||void 0===e?void 0:e.verifyUrl);let r;try{r=await this.fetchAttestation(e.attestationId,t)}catch(n){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(n),r=await this.fetchAttestation(e.attestationId,En)}return r},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const r=this.startAbortTimer(2*ne.ONE_SECOND),n=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(r),200===n.status?await n.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=r=>{"verify_ready"===r.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((r=>{if(document.getElementById(xn))return r();window.addEventListener("message",t);const n=document.createElement("iframe");n.id=xn,n.src=`${this.verifyUrl}/${this.projectId}`,n.style.display="none",document.body.append(n),this.iframe=n,e=r})),new Promise(((e,r)=>setTimeout((()=>{window.removeEventListener("message",t),r("verify iframe load timeout")}),(0,ne.toMiliseconds)(ne.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||_n;return kn.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${_n}`),t=_n),t},this.logger=(0,Z.generateChildLogger)(t,this.name),this.verifyUrl=_n,this.abortController=new AbortController,this.isDevEnv=(0,Se.isNode)()&&{NODE_ENV:"production",PUBLIC_URL:"/alephium-dex",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_NETWORK:"testnet"}.IS_VITEST}get context(){return(0,Z.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),(0,ne.toMiliseconds)(e))}}var ni=Object.defineProperty,ii=Object.getOwnPropertySymbols,oi=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,si=(e,t,r)=>t in e?ni(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ci=(e,t)=>{for(var r in t||(t={}))oi.call(t,r)&&si(e,r,t[r]);if(ii)for(var r of ii(t))ai.call(t,r)&&si(e,r,t[r]);return e};class li extends H{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=Br,this.events=new n.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=null===e||void 0===e?void 0:e.projectId,this.relayUrl=(null===e||void 0===e?void 0:e.relayUrl)||Zr,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof(null===e||void 0===e?void 0:e.logger)<"u"&&"string"!=typeof(null===e||void 0===e?void 0:e.logger)?e.logger:(0,Z.pino)((0,Z.getDefaultLoggerOptions)({level:(null===e||void 0===e?void 0:e.logger)||jr}));this.logger=(0,Z.generateChildLogger)(t,this.name),this.heartbeat=new z.HeartBeat,this.crypto=new An(this,this.logger,null===e||void 0===e?void 0:e.keychain),this.history=new ei(this,this.logger),this.expirer=new ti(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new U(ci(ci({},Dr),null===e||void 0===e?void 0:e.storageOptions)),this.relayer=new Vn({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Qn(this,this.logger),this.verify=new ri(this.projectId||"",this.logger)}static async init(e){const t=new li(e);await t.initialize();const r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return(0,Z.getLoggerContext)(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const ui=li,di="wc",fi=2,hi="client",pi=`${di}@${fi}:${hi}:`,mi={name:hi,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},gi={session_proposal:"session_proposal",session_update:"session_update",session_extend:"session_extend",session_ping:"session_ping",session_delete:"session_delete",session_expire:"session_expire",session_request:"session_request",session_request_sent:"session_request_sent",session_event:"session_event",proposal_expire:"proposal_expire"},vi={database:":memory:"},yi="WALLETCONNECT_DEEPLINK_CHOICE",bi={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},wi="history",xi="0.3",_i="proposal",Ei=ne.THIRTY_DAYS,ki="Proposal expired",Si="session",Ai=ne.SEVEN_DAYS,Mi="engine",Ci={wc_sessionPropose:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ne.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:ne.THIRTY_SECONDS,prompt:!1,tag:1115}}},Ii={min:ne.FIVE_MINUTES,max:ne.SEVEN_DAYS},Ti={idle:"IDLE",active:"ACTIVE"},Pi="request",Oi=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Ri=Object.defineProperty,Ni=Object.defineProperties,Bi=Object.getOwnPropertyDescriptors,Li=Object.getOwnPropertySymbols,ji=Object.prototype.hasOwnProperty,Di=Object.prototype.propertyIsEnumerable,Fi=(e,t,r)=>t in e?Ri(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ui=(e,t)=>{for(var r in t||(t={}))ji.call(t,r)&&Fi(e,r,t[r]);if(Li)for(var r of Li(t))Di.call(t,r)&&Fi(e,r,t[r]);return e},zi=(e,t)=>Ni(e,Bi(t));class Zi extends ee{constructor(e){var t;super(e),t=this,this.name=Mi,this.events=new(i()),this.initialized=!1,this.ignoredPayloadTypes=[Se.TYPE_1],this.requestQueue={state:Ti.idle,queue:[]},this.sessionRequestQueue={state:Ti.idle,queue:[]},this.requestQueueDelay=ne.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Ci)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),(0,ne.toMiliseconds)(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=zi(Ui({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:r,requiredNamespaces:n,optionalNamespaces:i,sessionProperties:o,relays:a}=t;let s,c=r,l=!1;if(c&&(l=this.client.core.pairing.pairings.get(c).active),!c||!l){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,s=t}const u=await this.client.core.crypto.generateKeyPair(),d=Ui({requiredNamespaces:n,optionalNamespaces:i,relays:null!==a&&void 0!==a?a:[{protocol:"irn"}],proposer:{publicKey:u,metadata:this.client.metadata}},o&&{sessionProperties:o}),{reject:f,resolve:h,done:p}=(0,Se.createDelayedPromise)(ne.FIVE_MINUTES,ki);if(this.events.once((0,Se.engineEvent)("session_connect"),(async e=>{let{error:t,session:r}=e;if(t)f(t);else if(r){r.self.publicKey=u;const e=zi(Ui({},r),{requiredNamespaces:r.requiredNamespaces,optionalNamespaces:r.optionalNamespaces});await this.client.session.set(r.topic,e),await this.setExpiry(r.topic,r.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:r.peer.metadata}),h(e)}})),!c){const{message:e}=(0,Se.getInternalError)("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const m=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:d}),g=(0,Se.calcExpiry)(ne.FIVE_MINUTES);return await this.setProposal(m,Ui({id:m,expiry:g},d)),{uri:s,approval:p}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:r,namespaces:n,sessionProperties:i}=e,o=this.client.proposal.get(t);let{pairingTopic:a,proposer:s,requiredNamespaces:c,optionalNamespaces:l}=o;a=a||"",(0,Se.isValidObject)(c)||(c=(0,Se.getRequiredNamespacesFromNamespaces)(n,"approve()"));const u=await this.client.core.crypto.generateKeyPair(),d=s.publicKey,f=await this.client.core.crypto.generateSharedKey(u,d);a&&t&&(await this.client.core.pairing.updateMetadata({topic:a,metadata:s.metadata}),await this.sendResult({id:t,topic:a,result:{relay:{protocol:null!==r&&void 0!==r?r:"irn"},responderPublicKey:u}}),await this.client.proposal.delete(t,(0,Se.getSdkError)("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:a}));const h=Ui({relay:{protocol:null!==r&&void 0!==r?r:"irn"},namespaces:n,requiredNamespaces:c,optionalNamespaces:l,pairingTopic:a,controller:{publicKey:u,metadata:this.client.metadata},expiry:(0,Se.calcExpiry)(Ai)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(f),await this.sendRequest({topic:f,method:"wc_sessionSettle",params:h,throwOnFailedPublish:!0});const p=zi(Ui({},h),{topic:f,pairingTopic:a,acknowledged:!1,self:h.controller,peer:{publicKey:s.publicKey,metadata:s.metadata},controller:u});return await this.client.session.set(f,p),await this.setExpiry(f,(0,Se.calcExpiry)(Ai)),{topic:f,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(f))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:r}=e,{pairingTopic:n}=this.client.proposal.get(t);n&&(await this.sendError(t,n,r),await this.client.proposal.delete(t,(0,Se.getSdkError)("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:r}=e,n=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r}}),{done:i,resolve:o,reject:a}=(0,Se.createDelayedPromise)();return this.events.once((0,Se.engineEvent)("session_update",n),(e=>{let{error:t}=e;t?a(t):o()})),await this.client.session.update(t,{namespaces:r}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,r=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:n,resolve:i,reject:o}=(0,Se.createDelayedPromise)();return this.events.once((0,Se.engineEvent)("session_extend",r),(e=>{let{error:t}=e;t?o(t):i()})),await this.setExpiry(t,(0,Se.calcExpiry)(Ai)),{acknowledged:n}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:r,topic:n,expiry:i}=e,o=Le(),{done:a,resolve:s,reject:c}=(0,Se.createDelayedPromise)(i,"Request expired. Please try again.");return this.events.once((0,Se.engineEvent)("session_request",o),(e=>{let{error:t,result:r}=e;t?c(t):s(r)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:o,topic:n,method:"wc_sessionRequest",params:{request:r,chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>c(e))),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:o}),e()})),new Promise((async e=>{const t=await(0,Se.getDeepLink)(this.client.core.storage,yi);(0,Se.handleDeeplinkRedirect)({id:o,topic:n,wcDeepLink:t}),e()})),a()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:r}=e,{id:n}=r;Je(r)?await this.sendResult({id:n,topic:t,result:r.result,throwOnFailedPublish:!0}):Xe(r)&&await this.sendError(n,t,r.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:r,resolve:n,reject:i}=(0,Se.createDelayedPromise)();this.events.once((0,Se.engineEvent)("session_ping",e),(e=>{let{error:t}=e;t?i(t):n()})),await r()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:r,chainId:n}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:n}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.client.session.keys.includes(t)?(await this.sendRequest({topic:t,method:"wc_sessionDelete",params:(0,Se.getSdkError)("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(t)):await this.client.core.pairing.disconnect({topic:t})},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>(0,Se.isSessionCompatible)(t,e)))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter((r=>{var n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic}));if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(t){this.client.logger.error(t)}},this.deleteSession=async(e,t)=>{const{self:r}=this.client.session.get(e);await this.client.core.relayer.unsubscribe(e),this.client.session.delete(e,(0,Se.getSdkError)("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(r.publicKey)&&await this.client.core.crypto.deleteKeyPair(r.publicKey),this.client.core.crypto.keychain.has(e)&&await this.client.core.crypto.deleteSymKey(e),t||this.client.core.expirer.del(e),this.client.core.storage.removeItem(yi).catch((e=>this.client.logger.warn(e)))},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,(0,Se.getSdkError)("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async function(e,r){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];await Promise.all([t.client.pendingRequest.delete(e,r),n?Promise.resolve():t.client.core.expirer.del(e)]),t.sessionRequestQueue.queue=t.sessionRequestQueue.queue.filter((t=>t.id!==e)),n&&(t.sessionRequestQueue.state=Ti.idle)},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,t.expiry)},this.setPendingSessionRequest=async e=>{const t=Ci.wc_sessionRequest.req.ttl,{id:r,topic:n,params:i,verifyContext:o}=e;await this.client.pendingRequest.set(r,{id:r,topic:n,params:i,verifyContext:o}),t&&this.client.core.expirer.set(r,(0,Se.calcExpiry)(t))},this.sendRequest=async e=>{const{topic:t,method:r,params:n,expiry:i,relayRpcId:o,clientRpcId:a,throwOnFailedPublish:s}=e,c=De(r,n,a);if((0,Se.isBrowser)()&&Oi.includes(r)){const e=(0,Se.hashMessage)(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}const l=await this.client.core.crypto.encode(t,c),u=Ci[r].req;return i&&(u.ttl=i),o&&(u.id=o),this.client.core.history.set(t,c),s?(u.internal=zi(Ui({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,l,u)):this.client.core.relayer.publish(t,l,u).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:r,result:n,throwOnFailedPublish:i}=e,o=Fe(t,n),a=await this.client.core.crypto.encode(r,o),s=await this.client.core.history.get(r,t),c=Ci[s.request.method].res;i?(c.internal=zi(Ui({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,a,c)):this.client.core.relayer.publish(r,a,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async(e,t,r)=>{const n=Ue(e,r),i=await this.client.core.crypto.encode(t,n),o=await this.client.core.history.get(t,e),a=Ci[o.request.method].res;this.client.core.relayer.publish(t,i,a),await this.client.core.history.resolve(n)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{(0,Se.isExpired)(t.expiry)&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{(0,Se.isExpired)(e.expiry)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession(e))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==Ti.active){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Ti.active;const t=this.requestQueue.queue.shift();if(t)try{this.processRequest(t),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=Ti.idle}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:r}=e,n=r.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeRequest(t,r);case"wc_sessionSettle":return this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return this.onSessionExtendRequest(t,r);case"wc_sessionPing":return this.onSessionPingRequest(t,r);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return this.onSessionRequest(t,r);case"wc_sessionEvent":return this.onSessionEventRequest(t,r);default:return this.client.logger.info(`Unsupported request method ${n}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.client.core.history.get(t,r.id)).request.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${n}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:r}=(0,Se.getInternalError)("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(r)},this.onSessionProposeRequest=async(e,t)=>{const{params:r,id:n}=t;try{this.isValidConnect(Ui({},t.params));const i=(0,Se.calcExpiry)(ne.FIVE_MINUTES),o=Ui({id:n,pairingTopic:e,expiry:i},r);await this.setProposal(n,o);const a=(0,Se.hashMessage)(JSON.stringify(t)),s=await this.getVerifyContext(a,o.proposer.metadata);this.client.events.emit("session_proposal",{id:n,params:o,verifyContext:s})}catch(H){await this.sendError(n,e,H),this.client.logger.error(H)}},this.onSessionProposeResponse=async(e,t)=>{const{id:r}=t;if(Je(t)){const{result:n}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:n});const i=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const a=n.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:a});const s=await this.client.core.crypto.generateSharedKey(o,a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:s});const c=await this.client.core.relayer.subscribe(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else Xe(t)&&(await this.client.proposal.delete(r,(0,Se.getSdkError)("USER_DISCONNECTED")),this.events.emit((0,Se.engineEvent)("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidSessionSettleRequest(n);const{relay:r,controller:i,expiry:o,namespaces:a,requiredNamespaces:s,optionalNamespaces:c,sessionProperties:l,pairingTopic:u}=t.params,d=Ui({topic:e,relay:r,expiry:o,namespaces:a,acknowledged:!0,pairingTopic:u,requiredNamespaces:s,optionalNamespaces:c,controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},l&&{sessionProperties:l});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit((0,Se.engineEvent)("session_connect"),{session:d}),this.cleanupDuplicatePairings(d)}catch(H){await this.sendError(r,e,H),this.client.logger.error(H)}},this.onSessionSettleResponse=async(e,t)=>{const{id:r}=t;Je(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit((0,Se.engineEvent)("session_approve",r),{})):Xe(t)&&(await this.client.session.delete(e,(0,Se.getSdkError)("USER_DISCONNECTED")),this.events.emit((0,Se.engineEvent)("session_approve",r),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:r,id:n}=t;try{const t=`${e}_session_update`,i=Se.MemoryStore.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidUpdate(Ui({topic:e},r)),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_update",{id:n,topic:e,params:r}),Se.MemoryStore.set(t,n)}catch(H){await this.sendError(n,e,H),this.client.logger.error(H)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:r}=t;Je(t)?this.events.emit((0,Se.engineEvent)("session_update",r),{}):Xe(t)&&this.events.emit((0,Se.engineEvent)("session_update",r),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,(0,Se.calcExpiry)(Ai)),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(n){await this.sendError(r,e,n),this.client.logger.error(n)}},this.onSessionExtendResponse=(e,t)=>{const{id:r}=t;Je(t)?this.events.emit((0,Se.engineEvent)("session_extend",r),{}):Xe(t)&&this.events.emit((0,Se.engineEvent)("session_extend",r),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(n){await this.sendError(r,e,n),this.client.logger.error(n)}},this.onSessionPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{Je(t)?this.events.emit((0,Se.engineEvent)("session_ping",r),{}):Xe(t)&&this.events.emit((0,Se.engineEvent)("session_ping",r),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(Yr,(async()=>{t(await this.deleteSession(e))}))})),this.sendResult({id:r,topic:e,result:!0})]),this.client.events.emit("session_delete",{id:r,topic:e})}catch(n){this.client.logger.error(n)}},this.onSessionRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidRequest(Ui({topic:e},n));const t=(0,Se.hashMessage)(JSON.stringify(De("wc_sessionRequest",n,r))),i=this.client.session.get(e),o={id:r,topic:e,params:n,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(o),this.addSessionRequestToSessionRequestQueue(o),this.processSessionRequestQueue()}catch(H){await this.sendError(r,e,H),this.client.logger.error(H)}},this.onSessionRequestResponse=(e,t)=>{const{id:r}=t;Je(t)?this.events.emit((0,Se.engineEvent)("session_request",r),{result:t.result}):Xe(t)&&this.events.emit((0,Se.engineEvent)("session_request",r),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:r,params:n}=t;try{const t=`${e}_session_event_${n.event.name}`,i=Se.MemoryStore.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidEmit(Ui({topic:e},n)),this.client.events.emit("session_event",{id:r,topic:e,params:n}),Se.MemoryStore.set(t,r)}catch(H){await this.sendError(r,e,H),this.client.logger.error(H)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=Ti.idle,this.processSessionRequestQueue()}),(0,ne.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Ti.active)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=Ti.active,this.client.events.emit("session_request",e)}catch(t){this.client.logger.error(t)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,De("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,relays:o}=e;if((0,Se.isUndefined)(t)||await this.isValidPairingTopic(t),!(0,Se.isValidRelays)(o,!0)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!(0,Se.isUndefined)(r)&&0!==(0,Se.isValidObject)(r)&&this.validateNamespaces(r,"requiredNamespaces"),!(0,Se.isUndefined)(n)&&0!==(0,Se.isValidObject)(n)&&this.validateNamespaces(n,"optionalNamespaces"),(0,Se.isUndefined)(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const r=(0,Se.isValidRequiredNamespaces)(e,"connect()",t);if(r)throw new Error(r.message)},this.isValidApprove=async e=>{if(!(0,Se.isValidParams)(e))throw new Error((0,Se.getInternalError)("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:r,relayProtocol:n,sessionProperties:i}=e;await this.isValidProposalId(t);const o=this.client.proposal.get(t),a=(0,Se.isValidNamespaces)(r,"approve()");if(a)throw new Error(a.message);const s=(0,Se.isConformingNamespaces)(o.requiredNamespaces,r,"approve()");if(s)throw new Error(s.message);if(!(0,Se.isValidString)(n,!0)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`approve() relayProtocol: ${n}`);throw new Error(e)}(0,Se.isUndefined)(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:r}=e;if(await this.isValidProposalId(t),!(0,Se.isValidErrorReason)(r)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:r,namespaces:n,expiry:i}=e;if(!(0,Se.isValidRelay)(t)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const o=(0,Se.isValidController)(r,"onSessionSettleRequest()");if(o)throw new Error(o.message);const a=(0,Se.isValidNamespaces)(n,"onSessionSettleRequest()");if(a)throw new Error(a.message);if((0,Se.isExpired)(i)){const{message:e}=(0,Se.getInternalError)("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:r}=e;await this.isValidSessionTopic(t);const n=this.client.session.get(t),i=(0,Se.isValidNamespaces)(r,"update()");if(i)throw new Error(i.message);const o=(0,Se.isConformingNamespaces)(n.requiredNamespaces,r,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:r,chainId:n,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:o}=this.client.session.get(t);if(!(0,Se.isValidNamespacesChainId)(o,n)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`request() chainId: ${n}`);throw new Error(e)}if(!(0,Se.isValidRequest)(r)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw new Error(e)}if(!(0,Se.isValidNamespacesRequest)(o,n,r.method)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`request() method: ${r.method}`);throw new Error(e)}if(i&&!(0,Se.isValidRequestExpiry)(i,Ii)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${Ii.min} and ${Ii.max}`);throw new Error(e)}},this.isValidRespond=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:t,response:r}=e;if(await this.isValidSessionTopic(t),!(0,Se.isValidResponse)(r)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:r,chainId:n}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!(0,Se.isValidNamespacesChainId)(i,n)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw new Error(e)}if(!(0,Se.isValidEvent)(r)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}if(!(0,Se.isValidNamespacesEvent)(i,n,r.name)){const{message:e}=(0,Se.getInternalError)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!(0,Se.isValidParams)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const r={verified:{verifyUrl:t.verifyUrl||_n,validation:"UNKNOWN",origin:t.url||""}};try{const n=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});n&&(r.verified.origin=n.origin,r.verified.isScam=n.isScam,r.verified.validation=n.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(n){this.client.logger.info(n)}return this.client.logger.info(`Verify context: ${JSON.stringify(r)}`),r},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!(0,Se.isValidString)(e,!1)){const{message:r}=(0,Se.getInternalError)("MISSING_OR_INVALID",`${t} must be in Record format. Received: ${JSON.stringify(e)}`);throw new Error(r)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=(0,Se.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Hr,(async e=>{const{topic:t,message:r}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;const n=await this.client.core.crypto.decode(t,r);try{Ge(n)?(this.client.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):Ye(n)?(await this.client.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.client.core.history.delete(t,n.id)):this.onRelayEventUnknownPayload({topic:t,payload:n})}catch(i){this.client.logger.error(i)}}))}registerExpirerEvents(){this.client.core.expirer.on(bn,(async e=>{const{topic:t,id:r}=(0,Se.parseExpirerTarget)(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,(0,Se.getInternalError)("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession(t,!0),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))}))}registerPairingEvents(){this.client.core.pairing.events.on(ln,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!(0,Se.isValidString)(e,!1)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if((0,Se.isExpired)(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=(0,Se.getInternalError)("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!(0,Se.isValidString)(e,!1)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if((0,Se.isExpired)(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:t}=(0,Se.getInternalError)("EXPIRED",`session topic: ${e}`);throw new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if((0,Se.isValidString)(e,!1)){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!(0,Se.isValidId)(e)){const{message:t}=(0,Se.getInternalError)("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=(0,Se.getInternalError)("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if((0,Se.isExpired)(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:t}=(0,Se.getInternalError)("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class qi extends Xn{constructor(e,t){super(e,t,_i,pi),this.core=e,this.logger=t}}class Hi extends Xn{constructor(e,t){super(e,t,Si,pi),this.core=e,this.logger=t}}class Vi extends Xn{constructor(e,t){super(e,t,Pi,pi,(e=>e.id)),this.core=e,this.logger=t}}class Wi extends Q{constructor(e){super(e),this.protocol=di,this.version=fi,this.name=mi.name,this.events=new n.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(t){throw this.logger.error(t.message),t}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(t){throw this.logger.error(t.message),t}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(t){throw this.logger.error(t.message),t}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(t){throw this.logger.error(t.message),t}},this.update=async e=>{try{return await this.engine.update(e)}catch(t){throw this.logger.error(t.message),t}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(t){throw this.logger.error(t.message),t}},this.request=async e=>{try{return await this.engine.request(e)}catch(t){throw this.logger.error(t.message),t}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(t){throw this.logger.error(t.message),t}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(t){throw this.logger.error(t.message),t}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(t){throw this.logger.error(t.message),t}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(t){throw this.logger.error(t.message),t}},this.find=e=>{try{return this.engine.find(e)}catch(t){throw this.logger.error(t.message),t}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=(null===e||void 0===e?void 0:e.name)||mi.name,this.metadata=(null===e||void 0===e?void 0:e.metadata)||(0,Se.getAppMetadata)();const t=typeof(null===e||void 0===e?void 0:e.logger)<"u"&&"string"!=typeof(null===e||void 0===e?void 0:e.logger)?e.logger:(0,Z.pino)((0,Z.getDefaultLoggerOptions)({level:(null===e||void 0===e?void 0:e.logger)||mi.logger}));this.core=(null===e||void 0===e?void 0:e.core)||new ui(e),this.logger=(0,Z.generateChildLogger)(t,this.name),this.session=new Hi(this.core,this.logger),this.proposal=new qi(this.core,this.logger),this.pendingRequest=new Vi(this.core,this.logger),this.engine=new Zi(this)}static async init(e){const t=new Wi(e);return await t.initialize(),t}get context(){return(0,Z.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}const $i=Wi},36394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(77778);n.__exportStar(r(21776),t),n.__exportStar(r(78206),t)},21776:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},78206:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},43750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(77778);n.__exportStar(r(46162),t),n.__exportStar(r(25839),t),n.__exportStar(r(99648),t),n.__exportStar(r(36394),t)},99648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(77778).__exportStar(r(13813),t)},13813:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},28959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=r(36394);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},57399:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},46162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(77778);n.__exportStar(r(57399),t),n.__exportStar(r(28959),t)},25839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if("undefined"!==typeof t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){const t=this.timestamps.get(e);if("undefined"===typeof t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=r,t.default=r},77778:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>b,__asyncValues:()=>x,__await:()=>y,__awaiter:()=>u,__classPrivateFieldGet:()=>S,__classPrivateFieldSet:()=>A,__createBinding:()=>f,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>k,__importStar:()=>E,__makeTemplateObject:()=>_,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>a,__spread:()=>g,__spreadArrays:()=>v,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof y?Promise.resolve(e.value.v).then(c,l):u(o[0][2],e)}(i[e](t))}catch(r){u(o[0][3],r)}}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:y(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},6588:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BASE10:()=>L,BASE16:()=>j,BASE64:()=>D,COLON:()=>me,DEFAULT_DEPTH:()=>ve,EMPTY_SPACE:()=>pe,ENV_MAP:()=>he,INTERNAL_ERRORS:()=>Bt,MemoryStore:()=>Mr,ONE_THOUSAND:()=>ye,REACT_NATIVE_PRODUCT:()=>fe,RELAYER_DEFAULT_PROTOCOL:()=>rt,SDK_ERRORS:()=>Nt,SDK_TYPE:()=>be,SLASH:()=>ge,TYPE_0:()=>U,TYPE_1:()=>z,UTF8:()=>F,appendToQueryString:()=>Se,assertType:()=>Re,buildApprovedNamespaces:()=>Tt,calcExpiry:()=>Ye,capitalize:()=>qe,capitalizeWord:()=>Ze,createDelayedPromise:()=>He,createExpiringPromise:()=>Ve,decodeTypeByte:()=>X,decrypt:()=>ee,deriveSymKey:()=>K,deserialize:()=>re,encodeTypeByte:()=>J,encrypt:()=>Q,engineEvent:()=>Xe,enumify:()=>ze,formatAccountId:()=>w,formatAccountWithChain:()=>k,formatChainId:()=>y,formatExpirerTarget:()=>We,formatIdTarget:()=>Ke,formatMessage:()=>B,formatMessageContext:()=>Be,formatRelayParams:()=>pt,formatRelayRpcUrl:()=>Pe,formatTopicTarget:()=>$e,formatUA:()=>Te,formatUri:()=>mt,generateKeyPair:()=>W,generateRandomBytes32:()=>$,getAccountsChains:()=>St,getAccountsFromNamespaces:()=>M,getAddressFromAccount:()=>_,getAddressesFromAccounts:()=>S,getAppMetadata:()=>Ae,getBrowserOnlineStatus:()=>wr,getBundleId:()=>ke,getChainFromAccount:()=>E,getChainsFromAccounts:()=>A,getChainsFromNamespace:()=>T,getChainsFromNamespaces:()=>C,getChainsFromRequiredNamespaces:()=>I,getDeepLink:()=>tt,getDidAddress:()=>N,getDidAddressSegments:()=>P,getDidChainId:()=>O,getEnvironment:()=>Ee,getHttpUrl:()=>Oe,getInternalError:()=>Lt,getJavascriptID:()=>Ie,getJavascriptOS:()=>Ce,getLastItems:()=>je,getNamespacedDidChainId:()=>R,getNamespacesChains:()=>At,getNamespacesEventsForChainId:()=>Ct,getNamespacesMethodsForChainId:()=>Mt,getNodeOnlineStatus:()=>_r,getReactNativeOnlineStatus:()=>xr,getRelayClientMetadata:()=>Me,getRelayProtocolApi:()=>it,getRelayProtocolName:()=>nt,getRequiredNamespacesFromNamespaces:()=>It,getSdkError:()=>jt,getUniqueValues:()=>x,handleDeeplinkRedirect:()=>et,hasOverlap:()=>Le,hashKey:()=>G,hashMessage:()=>Y,isBrowser:()=>_e,isCaipNamespace:()=>Pt,isConformingNamespaces:()=>gr,isExpired:()=>Je,isNode:()=>we,isOnline:()=>br,isProposalStruct:()=>$t,isReactNative:()=>xe,isSessionCompatible:()=>qt,isSessionStruct:()=>Kt,isTypeOneEnvelope:()=>oe,isUndefined:()=>Ut,isValidAccountId:()=>Vt,isValidAccounts:()=>Qt,isValidActions:()=>tr,isValidArray:()=>Dt,isValidChainId:()=>Ht,isValidChains:()=>Jt,isValidController:()=>Gt,isValidErrorReason:()=>lr,isValidEvent:()=>fr,isValidId:()=>sr,isValidNamespaceAccounts:()=>er,isValidNamespaceActions:()=>rr,isValidNamespaceChains:()=>Xt,isValidNamespaceMethodsOrEvents:()=>Yt,isValidNamespaces:()=>ir,isValidNamespacesChainId:()=>hr,isValidNamespacesEvent:()=>mr,isValidNamespacesRequest:()=>pr,isValidNumber:()=>Zt,isValidObject:()=>Ft,isValidParams:()=>cr,isValidRelay:()=>or,isValidRelays:()=>ar,isValidRequest:()=>ur,isValidRequestExpiry:()=>yr,isValidRequiredNamespaces:()=>nr,isValidResponse:()=>dr,isValidString:()=>zt,isValidUrl:()=>Wt,mapEntries:()=>Ue,mapToObj:()=>De,mergeArrays:()=>Qe,normalizeNamespaces:()=>Rt,objToMap:()=>Fe,parseAccountId:()=>b,parseChainId:()=>v,parseContextNames:()=>Ne,parseExpirerTarget:()=>Ge,parseNamespaceKey:()=>Ot,parseRelayParams:()=>dt,parseTopic:()=>ht,parseUri:()=>ft,serialize:()=>te,subscribeToBrowserNetworkChange:()=>kr,subscribeToNetworkChange:()=>Er,subscribeToReactNativeNetworkChange:()=>Sr,validateDecoding:()=>ne,validateEncoding:()=>ie});var n=r(85804),i=r(45514),o=r(43226),a=r(54811),s=r(54349),c=r(68756),l=r(67330),u=r(43750),d=r(3822),f=r(17448),h=r(36122);r(3505);const p={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};var m=r(54501);const g=":";function v(e){const[t,r]=e.split(g);return{namespace:t,reference:r}}function y(e){const{namespace:t,reference:r}=e;return[t,r].join(g)}function b(e){const[t,r,n]=e.split(g);return{namespace:t,reference:r,address:n}}function w(e){const{namespace:t,reference:r,address:n}=e;return[t,r,n].join(g)}function x(e,t){const r=[];return e.forEach((e=>{const n=t(e);r.includes(n)||r.push(n)})),r}function _(e){const{address:t}=b(e);return t}function E(e){const{namespace:t,reference:r}=b(e);return y({namespace:t,reference:r})}function k(e,t){const{namespace:r,reference:n}=v(t);return w({namespace:r,reference:n,address:e})}function S(e){return x(e,_)}function A(e){return x(e,E)}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return Object.keys(e).forEach((n=>{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...i.accounts)})),r}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return Object.keys(e).forEach((n=>{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...A(i.accounts))})),r}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return Object.keys(e).forEach((n=>{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...T(n,i))})),r}function T(e,t){return e.includes(":")?[e]:t.chains||[]}const P=e=>null===e||void 0===e?void 0:e.split(":"),O=e=>{const t=e&&P(e);if(t)return t[3]},R=e=>{const t=e&&P(e);if(t)return t[2]+":"+t[3]},N=e=>{const t=e&&P(e);if(t)return t.pop()},B=(e,t)=>[`${e.domain} wants you to sign in with your Ethereum account:`,N(t),"",e.statement,"",`URI: ${e.aud}`,`Version: ${e.version}`,`Chain ID: ${O(t)}`,`Nonce: ${e.nonce}`,`Issued At: ${e.iat}`,e.resources&&e.resources.length>0?`Resources:\n${e.resources.map((e=>`- ${e}`)).join("\n")}`:void 0].filter((e=>null!=e)).join("\n"),L="base10",j="base16",D="base64pad",F="utf8",U=0,z=1,Z=0,q=1,H=12,V=32;function W(){const e=s.Au();return{privateKey:(0,c.BB)(e.secretKey,j),publicKey:(0,c.BB)(e.publicKey,j)}}function $(){const e=(0,o.randomBytes)(V);return(0,c.BB)(e,j)}function K(e,t){const r=s.gi((0,c.mL)(e,j),(0,c.mL)(t,j),!0),n=new i.t(a.mE,r).expand(V);return(0,c.BB)(n,j)}function G(e){const t=(0,a.vp)((0,c.mL)(e,j));return(0,c.BB)(t,j)}function Y(e){const t=(0,a.vp)((0,c.mL)(e,F));return(0,c.BB)(t,j)}function J(e){return(0,c.mL)(`${e}`,L)}function X(e){return Number((0,c.BB)(e,L))}function Q(e){const t=J(typeof e.type<"u"?e.type:U);if(X(t)===z&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?(0,c.mL)(e.senderPublicKey,j):void 0,i=typeof e.iv<"u"?(0,c.mL)(e.iv,j):(0,o.randomBytes)(H);return te({type:t,sealed:new n.OK((0,c.mL)(e.symKey,j)).seal(i,(0,c.mL)(e.message,F)),iv:i,senderPublicKey:r})}function ee(e){const t=new n.OK((0,c.mL)(e.symKey,j)),{sealed:r,iv:i}=re(e.encoded),o=t.open(i,r);if(null===o)throw new Error("Failed to decrypt");return(0,c.BB)(o,F)}function te(e){if(X(e.type)===z){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,c.BB)((0,c.zo)([e.type,e.senderPublicKey,e.iv,e.sealed]),D)}return(0,c.BB)((0,c.zo)([e.type,e.iv,e.sealed]),D)}function re(e){const t=(0,c.mL)(e,D),r=t.slice(Z,q),n=q;if(X(r)===z){const e=n+V,i=e+H,o=t.slice(n,e),a=t.slice(e,i);return{type:r,sealed:t.slice(i),iv:a,senderPublicKey:o}}const i=n+H,o=t.slice(n,i);return{type:r,sealed:t.slice(i),iv:o}}function ne(e,t){const r=re(e);return ie({type:X(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?(0,c.BB)(r.senderPublicKey,j):void 0,receiverPublicKey:null===t||void 0===t?void 0:t.receiverPublicKey})}function ie(e){const t=(null===e||void 0===e?void 0:e.type)||U;if(t===z){if(typeof(null===e||void 0===e?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(null===e||void 0===e?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:null===e||void 0===e?void 0:e.senderPublicKey,receiverPublicKey:null===e||void 0===e?void 0:e.receiverPublicKey}}function oe(e){return e.type===z&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var ae=Object.defineProperty,se=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ue=(e,t,r)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,de=(e,t)=>{for(var r in t||(t={}))ce.call(t,r)&&ue(e,r,t[r]);if(se)for(var r of se(t))le.call(t,r)&&ue(e,r,t[r]);return e};const fe="ReactNative",he={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},pe=" ",me=":",ge="/",ve=2,ye=1e3,be="js";function we(){return typeof m<"u"&&typeof m.versions<"u"&&typeof m.versions.node<"u"}function xe(){return!(0,d.getDocument)()&&!!(0,d.getNavigator)()&&navigator.product===fe}function _e(){return!we()&&!!(0,d.getNavigator)()}function Ee(){return xe()?he.reactNative:we()?he.node:_e()?he.browser:he.unknown}function ke(){var e;try{return xe()&&typeof r.g<"u"&&typeof(null==r.g?void 0:r.g.Application)<"u"?null==(e=r.g.Application)?void 0:e.applicationId:void 0}catch{return}}function Se(e,t){let r=h.parse(e);return r=de(de({},r),t),e=h.stringify(r)}function Ae(){return(0,f.D)()||{name:"",description:"",url:"",icons:[""]}}function Me(e,t){var r;const n=Ee(),i={protocol:e,version:t,env:n};return"browser"===n&&(i.host=(null==(r=(0,d.getLocation)())?void 0:r.host)||"unknown"),i}function Ce(){if(Ee()===he.reactNative&&typeof r.g<"u"&&typeof(null==r.g?void 0:r.g.Platform)<"u"){const{OS:e,Version:t}=r.g.Platform;return[e,t].join("-")}const e=(0,l.qY)();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function Ie(){var e;const t=Ee();return t===he.browser?[t,(null==(e=(0,d.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}function Te(e,t,r){const n=Ce(),i=Ie();return[[e,t].join("-"),[be,r].join("-"),n,i].join("/")}function Pe(e){let{protocol:t,version:r,relayUrl:n,sdkVersion:i,auth:o,projectId:a,useOnCloseEvent:s,bundleId:c}=e;const l=n.split("?"),u={auth:o,ua:Te(t,r,i),projectId:a,useOnCloseEvent:s||void 0,origin:c||void 0},d=Se(l[1]||"",u);return l[0]+"?"+d}function Oe(e){let t=(e.match(/^[^:]+(?=:\/\/)/gi)||[])[0];const r=typeof t<"u"?e.split("://")[1]:e;return t="wss"===t?"https":"http",[t,r].join("://")}function Re(e,t,r){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid "${t}" param`)}function Ne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ve;return je(e.split(ge),t)}function Be(e){return Ne(e).join(pe)}function Le(e,t){return e.filter((e=>t.includes(e))).length===e.length}function je(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ve;return e.slice(Math.max(e.length-t,0))}function De(e){return Object.fromEntries(e.entries())}function Fe(e){return new Map(Object.entries(e))}function Ue(e,t){const r={};return Object.keys(e).forEach((n=>{r[n]=t(e[n])})),r}const ze=e=>e;function Ze(e){return e.trim().replace(/^\w/,(e=>e.toUpperCase()))}function qe(e){return e.split(pe).map((e=>Ze(e))).join(pe)}function He(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.FIVE_MINUTES,t=arguments.length>1?arguments[1]:void 0;const r=(0,u.toMiliseconds)(e||u.FIVE_MINUTES);let n,i,o;return{resolve:e=>{o&&n&&(clearTimeout(o),n(e))},reject:e=>{o&&i&&(clearTimeout(o),i(e))},done:()=>new Promise(((e,a)=>{o=setTimeout((()=>{a(new Error(t))}),r),n=e,i=a}))}}function Ve(e,t,r){return new Promise((async(n,i)=>{const o=setTimeout((()=>i(new Error(r))),t);try{n(await e)}catch(a){i(a)}clearTimeout(o)}))}function We(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function $e(e){return We("topic",e)}function Ke(e){return We("id",e)}function Ge(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)n.topic=r;else{if("id"!==t||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);n.id=Number(r)}return n}function Ye(e,t){return(0,u.fromMiliseconds)((t||Date.now())+(0,u.toMiliseconds)(e))}function Je(e){return Date.now()>=(0,u.toMiliseconds)(e)}function Xe(e,t){return`${e}${t?`:${t}`:""}`}function Qe(){return[...new Set([...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]])]}async function et(e){let{id:t,topic:n,wcDeepLink:i}=e;try{if(!i)return;const e="string"==typeof i?JSON.parse(i):i;let o=null===e||void 0===e?void 0:e.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));const a=`${o}/wc?requestId=${t}&sessionTopic=${n}`,s=Ee();s===he.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):s===he.reactNative&&typeof(null==r.g?void 0:r.g.Linking)<"u"&&await r.g.Linking.openURL(a)}catch(o){console.error(o)}}async function tt(e,t){try{return await e.getItem(t)||(_e()?localStorage.getItem(t):void 0)}catch(r){console.error(r)}}const rt="irn";function nt(e){return(null===e||void 0===e?void 0:e.relay)||{protocol:rt}}function it(e){const t=p[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var ot=Object.defineProperty,at=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,lt=(e,t,r)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ut=(e,t)=>{for(var r in t||(t={}))st.call(t,r)&<(e,r,t[r]);if(at)for(var r of at(t))ct.call(t,r)&<(e,r,t[r]);return e};function dt(e){const t={},r="relay"+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-");return Object.keys(e).forEach((n=>{if(n.startsWith(r)){const i=n.replace(r,""),o=e[n];t[i]=o}})),t}function ft(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,t),i=e.substring(t+1,r).split("@"),o=typeof r<"u"?e.substring(r):"",a=h.parse(o);return{protocol:n,topic:ht(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:dt(a)}}function ht(e){return e.startsWith("//")?e.substring(2):e}function pt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";const r={};return Object.keys(e).forEach((n=>{const i="relay"+t+n;e[n]&&(r[i]=e[n])})),r}function mt(e){return`${e.protocol}:${e.topic}@${e.version}?`+h.stringify(ut({symKey:e.symKey},pt(e.relay)))}var gt=Object.defineProperty,vt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,bt=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,_t=(e,t,r)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Et=(e,t)=>{for(var r in t||(t={}))wt.call(t,r)&&_t(e,r,t[r]);if(bt)for(var r of bt(t))xt.call(t,r)&&_t(e,r,t[r]);return e},kt=(e,t)=>vt(e,yt(t));function St(e){const t=[];return e.forEach((e=>{const[r,n]=e.split(":");t.push(`${r}:${n}`)})),t}function At(e){const t=[];return Object.values(e).forEach((e=>{t.push(...St(e.accounts))})),t}function Mt(e,t){const r=[];return Object.values(e).forEach((e=>{St(e.accounts).includes(t)&&r.push(...e.methods)})),r}function Ct(e,t){const r=[];return Object.values(e).forEach((e=>{St(e.accounts).includes(t)&&r.push(...e.events)})),r}function It(e,t){const r=ir(e,t);if(r)throw new Error(r.message);const n={};for(const[i,o]of Object.entries(e))n[i]={methods:o.methods,events:o.events,chains:o.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return n}function Tt(e){const{proposal:{requiredNamespaces:t,optionalNamespaces:r={}},supportedNamespaces:n}=e,i=Rt(t),o=Rt(r),a={};Object.keys(n).forEach((e=>{const t=n[e].chains,r=n[e].methods,i=n[e].events,o=n[e].accounts;t.forEach((t=>{if(!o.some((e=>e.includes(t))))throw new Error(`No accounts provided for chain ${t} in namespace ${e}`)})),a[e]={chains:t,methods:r,events:i,accounts:o}}));const s=gr(t,a,"approve()");if(s)throw new Error(s.message);const c={};return Object.keys(t).length||Object.keys(r).length?(Object.keys(i).forEach((e=>{const t=n[e].chains.filter((t=>{var r,n;return null==(n=null==(r=i[e])?void 0:r.chains)?void 0:n.includes(t)})),r=n[e].methods.filter((t=>{var r,n;return null==(n=null==(r=i[e])?void 0:r.methods)?void 0:n.includes(t)})),o=n[e].events.filter((t=>{var r,n;return null==(n=null==(r=i[e])?void 0:r.events)?void 0:n.includes(t)})),a=t.map((t=>n[e].accounts.filter((e=>e.includes(`${t}:`))))).flat();c[e]={chains:t,methods:r,events:o,accounts:a}})),Object.keys(o).forEach((e=>{var t,r,i,a,s,l;if(!n[e])return;const u=null==(r=null==(t=o[e])?void 0:t.chains)?void 0:r.filter((t=>n[e].chains.includes(t))),d=n[e].methods.filter((t=>{var r,n;return null==(n=null==(r=o[e])?void 0:r.methods)?void 0:n.includes(t)})),f=n[e].events.filter((t=>{var r,n;return null==(n=null==(r=o[e])?void 0:r.events)?void 0:n.includes(t)})),h=null===u||void 0===u?void 0:u.map((t=>n[e].accounts.filter((e=>e.includes(`${t}:`))))).flat();c[e]={chains:Qe(null==(i=c[e])?void 0:i.chains,u),methods:Qe(null==(a=c[e])?void 0:a.methods,d),events:Qe(null==(s=c[e])?void 0:s.events,f),accounts:Qe(null==(l=c[e])?void 0:l.accounts,h)}})),c):a}function Pt(e){return e.includes(":")}function Ot(e){return Pt(e)?e.split(":")[0]:e}function Rt(e){var t,r,n;const i={};if(!Ft(e))return i;for(const[o,a]of Object.entries(e)){const e=Pt(o)?[o]:a.chains,s=a.methods||[],c=a.events||[],l=Ot(o);i[l]=kt(Et({},i[l]),{chains:Qe(e,null==(t=i[l])?void 0:t.chains),methods:Qe(s,null==(r=i[l])?void 0:r.methods),events:Qe(c,null==(n=i[l])?void 0:n.events)})}return i}const Nt={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Bt={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Lt(e,t){const{message:r,code:n}=Bt[e];return{message:t?`${r} ${t}`:r,code:n}}function jt(e,t){const{message:r,code:n}=Nt[e];return{message:t?`${r} ${t}`:r,code:n}}function Dt(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function Ft(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Ut(e){return typeof e>"u"}function zt(e,t){return!(!t||!Ut(e))||"string"==typeof e&&!!e.trim().length}function Zt(e,t){return!(!t||!Ut(e))||"number"==typeof e&&!isNaN(e)}function qt(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),i=Object.keys(r);let o=!0;return!!Le(i,n)&&(n.forEach((t=>{const{accounts:n,methods:i,events:a}=e.namespaces[t],s=St(n),c=r[t];(!Le(T(t,c),s)||!Le(c.methods,i)||!Le(c.events,a))&&(o=!1)})),o)}function Ht(e){return!(!zt(e,!1)||!e.includes(":"))&&2===e.split(":").length}function Vt(e){if(zt(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&Ht(e)}}return!1}function Wt(e){if(zt(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function $t(e){var t;return null==(t=null===e||void 0===e?void 0:e.proposer)?void 0:t.publicKey}function Kt(e){return null===e||void 0===e?void 0:e.topic}function Gt(e,t){let r=null;return zt(null===e||void 0===e?void 0:e.publicKey,!1)||(r=Lt("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function Yt(e){let t=!0;return Dt(e)?e.length&&(t=e.every((e=>zt(e,!1)))):t=!1,t}function Jt(e,t,r){let n=null;return Dt(t)&&t.length?t.forEach((e=>{n||Ht(e)||(n=jt("UNSUPPORTED_CHAINS",`${r}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):Ht(e)||(n=jt("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function Xt(e,t,r){let n=null;return Object.entries(e).forEach((e=>{let[i,o]=e;if(n)return;const a=Jt(i,T(i,o),`${t} ${r}`);a&&(n=a)})),n}function Qt(e,t){let r=null;return Dt(e)?e.forEach((e=>{r||Vt(e)||(r=jt("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):r=jt("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function er(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=Qt(null===e||void 0===e?void 0:e.accounts,`${t} namespace`);n&&(r=n)})),r}function tr(e,t){let r=null;return Yt(null===e||void 0===e?void 0:e.methods)?Yt(null===e||void 0===e?void 0:e.events)||(r=jt("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=jt("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function rr(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=tr(e,`${t}, namespace`);n&&(r=n)})),r}function nr(e,t,r){let n=null;if(e&&Ft(e)){const i=rr(e,t);i&&(n=i);const o=Xt(e,t,r);o&&(n=o)}else n=Lt("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function ir(e,t){let r=null;if(e&&Ft(e)){const n=rr(e,t);n&&(r=n);const i=er(e,t);i&&(r=i)}else r=Lt("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function or(e){return zt(e.protocol,!0)}function ar(e,t){let r=!1;return t&&!e?r=!0:e&&Dt(e)&&e.length&&e.forEach((e=>{r=or(e)})),r}function sr(e){return"number"==typeof e}function cr(e){return typeof e<"u"&&null!==typeof e}function lr(e){return!(!e||"object"!=typeof e||!e.code||!Zt(e.code,!1)||!e.message||!zt(e.message,!1))}function ur(e){return!(Ut(e)||!zt(e.method,!1))}function dr(e){return!(Ut(e)||Ut(e.result)&&Ut(e.error)||!Zt(e.id,!1)||!zt(e.jsonrpc,!1))}function fr(e){return!(Ut(e)||!zt(e.name,!1))}function hr(e,t){return!(!Ht(t)||!At(e).includes(t))}function pr(e,t,r){return!!zt(r,!1)&&Mt(e,t).includes(r)}function mr(e,t,r){return!!zt(r,!1)&&Ct(e,t).includes(r)}function gr(e,t,r){let n=null;const i=function(e){const t={};return Object.keys(e).forEach((r=>{var n;r.includes(":")?t[r]=e[r]:null==(n=e[r].chains)||n.forEach((n=>{t[n]={methods:e[r].methods,events:e[r].events}}))})),t}(e),o=function(e){const t={};return Object.keys(e).forEach((r=>{if(r.includes(":"))t[r]=e[r];else{const n=St(e[r].accounts);null===n||void 0===n||n.forEach((n=>{t[n]={accounts:e[r].accounts.filter((e=>e.includes(`${n}:`))),methods:e[r].methods,events:e[r].events}}))}})),t}(t),a=Object.keys(i),s=Object.keys(o),c=vr(Object.keys(e)),l=vr(Object.keys(t)),u=c.filter((e=>!l.includes(e)));return u.length&&(n=Lt("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${u.toString()}\n Received: ${Object.keys(t).toString()}`)),Le(a,s)||(n=Lt("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n Required: ${a.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||n)return;const i=St(t[e].accounts);i.includes(e)||(n=Lt("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),a.forEach((e=>{n||(Le(i[e].methods,o[e].methods)?Le(i[e].events,o[e].events)||(n=Lt("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):n=Lt("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))})),n}function vr(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function yr(e,t){return Zt(e,!1)&&e<=t.max&&e>=t.min}function br(){const e=Ee();return new Promise((t=>{switch(e){case he.browser:t(wr());break;case he.reactNative:t(xr());break;case he.node:default:t(!0)}}))}function wr(){var e;return _e()&&(null===(e=navigator)||void 0===e?void 0:e.onLine)}async function xr(){if(xe()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo){const e=await(null==r.g?void 0:r.g.NetInfo.fetch());return null===e||void 0===e?void 0:e.isConnected}return!0}function _r(){return!0}function Er(e){switch(Ee()){case he.browser:kr(e);break;case he.reactNative:Sr(e);case he.node:}}function kr(e){!xe()&&_e()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}function Sr(e){var t;xe()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo&&(null===(t=r.g)||void 0===t||t.NetInfo.addEventListener((t=>e(null===t||void 0===t?void 0:t.isConnected))))}const Ar={};class Mr{static get(e){return Ar[e]}static set(e,t){Ar[e]=t}static delete(e){delete Ar[e]}}},3822:(e,t)=>{"use strict";function r(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function n(e){const t=r(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},17448:(e,t,r)=>{"use strict";t.D=void 0;const n=r(3822);t.D=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(o){return null}function r(){for(var t=arguments.length,r=new Array(t),n=0;nt.getAttribute(e))).filter((e=>!!e&&r.includes(e)));if(n.length&&n){const e=t.getAttribute("content");if(e)return e}}return""}const i=function(){let t=r("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:r("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const r=e.getElementsByTagName("link"),n=[];for(let e=0;e-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{const n=t.pathname.split("/");n.pop();r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){const r=t.protocol+e;n.push(r)}else n.push(e)}}return n}(),name:i}}},36122:(e,t,r)=>{"use strict";const n=r(94410),i=r(17155),o=r(68321),a=r(74069),s=Symbol("encodeFragmentIdentifier");function c(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?i(e):e}function d(e){return Array.isArray(e)?e.sort():"object"===typeof e?d(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function f(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const i="string"===typeof r&&r.includes(e.arrayFormatSeparator),o="string"===typeof r&&!i&&u(r,e).includes(e.arrayFormatSeparator);r=o?u(r,e):r;const a=i||o?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r?u(r,e):r);const o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!==typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const i of e.split("&")){if(""===i)continue;let[e,a]=o(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:u(a,t),r(u(e,t),a,n)}for(const i of Object.keys(n)){const e=n[i];if("object"===typeof e&&null!==e)for(const r of Object.keys(e))e[r]=p(e[r],t);else n[i]=p(e,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?e[t]=d(r):e[t]=r,e}),Object.create(null))}t.extract=h,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>{return t.skipNull&&(null===(n=e[r])||void 0===n)||t.skipEmptyString&&""===e[r];var n},n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[",i,"]"].join("")]:[...r,[l(t,e),"[",l(i,e),"]=",l(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),":list="].join("")]:[...r,[l(t,e),":list=",l(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[l(r,e),t,l(i,e)].join("")]:[[n,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,l(t,e)]:[...r,[l(t,e),"=",l(n,e)].join("")]}}(t),i={};for(const a of Object.keys(e))r(a)||(i[a]=e[a]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{const i=e[r];return void 0===i?"":null===i?l(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":i.reduce(n(r),[]).join("&"):l(r,t)+"="+l(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(h(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[s]:!0},r);const n=f(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query);let c=t.stringify(a,r);c&&(c=`?${c}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[s]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${c}${u}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:i,query:o,fragmentIdentifier:c}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:a(o,r),fragmentIdentifier:c},n)},t.exclude=(e,r,n)=>{const i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},94410:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},87239:(e,t)=>{"use strict";function r(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function n(e){const t=r(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},64731:(e,t,r)=>{"use strict";t.D=void 0;const n=r(87239);t.D=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(o){return null}function r(){for(var t=arguments.length,r=new Array(t),n=0;nt.getAttribute(e))).filter((e=>!!e&&r.includes(e)));if(n.length&&n){const e=t.getAttribute("content");if(e)return e}}return""}const i=function(){let t=r("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:r("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const r=e.getElementsByTagName("link"),n=[];for(let e=0;e-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{const n=t.pathname.split("/");n.pop();r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){const r=t.protocol+e;n.push(r)}else n.push(e)}}return n}(),name:i}}},30084:function(e){"use strict";!function(t){function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function a(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var s={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},c=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],r=0;r>4]+e[15&i])}return r.join("")}}}(),l={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],f=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],v=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],x=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],_=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var a,s=0,c=i;c>16&255]<<24^d[a>>8&255]<<16^d[255&a]<<8^d[a>>24&255]^u[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^d[a>>16&255]<<16^d[a>>24&255]<<24;for(t=i/2+1;t>2,h=c%4,this._Ke[f][h]=o[t],this._Kd[e-f][h]=o[t++],c++}for(var f=1;f>24&255]^_[a>>16&255]^E[a>>8&255]^k[255&a]},A.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var a=1;a>24&255]^p[n[(i+1)%4]>>16&255]^m[n[(i+2)%4]>>8&255]^g[255&n[(i+3)%4]]^this._Ke[a][i];n=r.slice()}var s,c=o(16);for(i=0;i<4;i++)s=this._Ke[t][i],c[4*i]=255&(d[n[i]>>24&255]^s>>24),c[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^s>>16),c[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^s>>8),c[4*i+3]=255&(d[255&n[(i+3)%4]]^s);return c},A.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var a=1;a>24&255]^y[n[(i+3)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[a][i];n=r.slice()}var s,c=o(16);for(i=0;i<4;i++)s=this._Kd[t][i],c[4*i]=255&(f[n[i]>>24&255]^s>>24),c[4*i+1]=255&(f[n[(i+3)%4]>>16&255]^s>>16),c[4*i+2]=255&(f[n[(i+2)%4]>>8&255]^s>>8),c[4*i+3]=255&(f[255&n[(i+1)%4]]^s);return c};var M=function(e){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new A(e)};M.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n=0;--t)this._counter[t]=e%256,e>>=8},P.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},P.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var O=function(e,t){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof P||(t=new P(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new A(e)};O.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n{"use strict";const n=t;n.bignum=r(17592),n.define=r(20937).define,n.base=r(69439),n.constants=r(72215),n.decoders=r(33935),n.encoders=r(79146)},20937:(e,t,r)=>{"use strict";const n=r(79146),i=r(33935),o=r(47110);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},13147:(e,t,r)=>{"use strict";const n=r(47110),i=r(58417).b,o=r(74054).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return s.isEncoderBuffer(e)||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"===typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"===typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),t.C=a,a.isDecoderBuffer=function(e){if(e instanceof a)return!0;return"object"===typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"===typeof e.offset&&"number"===typeof e.length&&"function"===typeof e.save&&"function"===typeof e.restore&&"function"===typeof e.isEmpty&&"function"===typeof e.readUInt8&&"function"===typeof e.skip&&"function"===typeof e.raw},a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){const t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=s,s.isEncoderBuffer=function(e){if(e instanceof s)return!0;return"object"===typeof e&&"EncoderBuffer"===e.constructor.name&&"number"===typeof e.length&&"function"===typeof e.join},s.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"===typeof this.value?e[t]=this.value:"string"===typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},69439:(e,t,r)=>{"use strict";const n=t;n.Reporter=r(58417).b,n.DecoderBuffer=r(13147).C,n.EncoderBuffer=r(13147).R,n.Node=r(38294)},38294:(e,t,r)=>{"use strict";const n=r(58417).b,i=r(13147).R,o=r(13147).C,a=r(13859),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function l(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=l;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},l.prototype._wrap=function(){const e=this._baseState;c.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},l.prototype._init=function(e){const t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){l.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){l.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}})),l.prototype.use=function(e){a(e);const t=this._baseState;return a(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){const t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){const t=this._baseState;return a(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){const t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},l.prototype.contains=function(e){const t=this._baseState;return a(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(a=this._peekTag(e,n,r.any),e.isError(a))return a}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(c){a=!1}e.restore(n)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},l.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},l.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const a=e.save(),s=r.choice[o];try{const r=s._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(c){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},l.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},l.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,s,r,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},l.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},58417:(e,t,r)=>{"use strict";const n=r(47110);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},99041:(e,t)=>{"use strict";function r(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},72215:(e,t,r)=>{"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},n.der=r(99041)},21098:(e,t,r)=>{"use strict";const n=r(47110),i=r(17592),o=r(13147).C,a=r(38294),s=r(99041);function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){a.call(this,"der",e)}function u(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=s.tagClass[r>>6],i=0===(32&r);if(31===(31&r)){let n=r;for(r=0;128===(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function d(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0===(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let o=0;o{"use strict";const n=t;n.der=r(21098),n.pem=r(14580)},14580:(e,t,r)=>{"use strict";const n=r(47110),i=r(74054).Buffer,o=r(21098);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,c=-1;for(let i=0;i{"use strict";const n=r(47110),i=r(74054).Buffer,o=r(38294),a=r(99041);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.call(this,"der",e)}function l(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,o),c.prototype._encodeComposite=function(e,t,r,n){const o=function(e,t,r,n){let i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!==typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}if(i>=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6,i}(e,t,r,this.reporter);if(n.length<128){const e=i.alloc(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let s=1;for(let i=n.length;i>=256;i>>=8)s++;const c=i.alloc(2+s);c[0]=o,c[1]=128|s;for(let i=1+s,a=n.length;a>0;i--,a>>=8)c[i]=255&a;return this._createEncoderBuffer([c,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let i=0;i=128;t>>=7)n++}const o=i.alloc(n);let a=o.length-1;for(let i=e.length-1;i>=0;i--){let t=e[i];for(o[a--]=127&t;(t>>=7)>0;)o[a--]=128|127&t}return this._createEncoderBuffer(o)},c.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[l(n.getUTCFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[l(n.getUTCFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=i.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let i=e;i>=256;i>>=8)r++;const n=new Array(r);for(let i=n.length-1;i>=0;i--)n[i]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i{"use strict";const n=t;n.der=r(95245),n.pem=r(3732)},3732:(e,t,r)=>{"use strict";const n=r(47110),i=r(95245);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){const r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let i=0;i=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,d=67108863&c,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,l=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,_=0|a[4],E=8191&_,k=_>>>13,S=0|a[5],A=8191&S,M=S>>>13,C=0|a[6],I=8191&C,T=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,N=0|a[8],B=8191&N,L=N>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,Z=U>>>13,q=0|s[1],H=8191&q,V=q>>>13,W=0|s[2],$=8191&W,K=W>>>13,G=0|s[3],Y=8191&G,J=G>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,le=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,Z))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,Z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,Z))+Math.imul(m,z)|0,o=Math.imul(m,Z);var ve=(l+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,Z))+Math.imul(y,z)|0,o=Math.imul(y,Z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,V)|0;var ye=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,Z))+Math.imul(x,z)|0,o=Math.imul(x,Z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Y)|0))<<13)|0;l=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,Z))+Math.imul(k,z)|0,o=Math.imul(k,Z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0;var we=(l+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,Z))+Math.imul(M,z)|0,o=Math.imul(M,Z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var xe=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;l=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,Z))+Math.imul(T,z)|0,o=Math.imul(T,Z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,Z))+Math.imul(R,z)|0,o=Math.imul(R,Z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ce)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,Z))+Math.imul(L,z)|0,o=Math.imul(L,Z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(l+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,Z))+Math.imul(F,z)|0,o=Math.imul(F,Z),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Se=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,V))+Math.imul(F,H)|0,o=Math.imul(F,V),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,le)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ae=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,K))+Math.imul(F,$)|0,o=Math.imul(F,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Me=(l+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;l=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,J))+Math.imul(F,Y)|0,o=Math.imul(F,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,le)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ce=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,le)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,fe)|0;var Te=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(T,pe)|0))<<13)|0;l=((o=o+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,ce),i=(i=Math.imul(D,le))+Math.imul(F,ce)|0,o=Math.imul(F,le),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,fe)|0;var Oe=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,de),i=(i=Math.imul(D,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(l+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(L,pe)|0))<<13)|0;l=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(l+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=ge,c[1]=ve,c[2]=ye,c[3]=be,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=ke,c[9]=Se,c[10]=Ae,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=Te,c[15]=Pe,c[16]=Oe,c[17]=Re,c[18]=Ne,0!==l&&(c[19]=l,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var l=0;l=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(l)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var d=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},58306:e=>{"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,l=new Uint8Array(o);e[r];){var u=t[e.charCodeAt(r)];if(255===u)return;for(var d=0,f=o-1;(0!==u||d>>0,l[f]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,r++}for(var h=o-i;h!==o&&0===l[h];)h++;for(var p=new Uint8Array(n+(o-h)),m=n;h!==o;)p[m++]=l[h++];return p}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var c=(o-i)*l+1>>>0,u=new Uint8Array(c);i!==o;){for(var d=t[i],f=0,h=c-1;(0!==d||f>>0,u[h]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");n=f,i++}for(var p=c-n;p!==c&&0===u[p];)p++;for(var m=s.repeat(r);p{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=c(e),a=o[0],s=o[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),u=0,d=s>0?a-4:a;for(r=0;r>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[u++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},78963:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;rt)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var c=e.slice(0,s),l=e.slice(s+1);if(l.length<6)return"Data too short";var u=a(c);if("string"===typeof u)return u;for(var d=[],f=0;f=l.length||d.push(p)}return 1!==u?"Invalid checksum for "+e:{prefix:c,words:d}}function c(e,t,r,n){for(var i=0,o=0,a=(1<=r;)o-=r,s.push(i>>o&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var s=e+"1",c=0;c>5!==0)throw new Error("Non 5-bit word");i=o(i)^l,s+=t.charAt(l)}for(c=0;c<6;++c)i=o(i);for(i^=1,c=0;c<6;++c){var u=i>>5*(5-c)&31;s+=t.charAt(u)}return s},toWordsUnsafe:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},22976:function(e,t,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,c=Math.floor,l="[BigNumber Error] ",u=l+"Number primitive has more than 15 significant digits: ",d=1e14,f=14,h=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,g=1e9;function v(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nl^r?1:-1;for(s=(c=i.length)<(l=o.length)?c:l,a=0;ao[a]^r?1:-1;return c==l?0:c>l^r?1:-1}function w(e,t,r,n){if(er||e!==c(e))throw Error(l+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function x(e){var t=e.c.length-1;return v(e.e/f)==t&&e.c[t]%2!=0}function _(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tT?v.c=v.e=null:e.e=10;d/=10,l++);return void(l>T?v.c=v.e=null:(v.e=l,v.c=[e]))}g=String(e)}else{if(!a.test(g=String(e)))return i(v,g,p);v.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(l=g.indexOf("."))>-1&&(g=g.replace(".","")),(d=g.search(/e/i))>0?(l<0&&(l=d),l+=+g.slice(d+1),g=g.substring(0,d)):l<0&&(l=g.length)}else{if(w(t,2,B.length,"Base"),10==t&&L)return z(v=new j(e),S+v.e+1,A);if(g=String(e),p="number"==typeof e){if(0*e!=0)return i(v,g,p,t);if(v.s=1/e<0?(g=g.slice(1),-1):1,j.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else v.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=B.slice(0,t),l=d=0,m=g.length;dl){l=m;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,d=-1,l=0;continue}return i(v,String(e),p,t)}p=!1,(l=(g=n(g,t,10,v.s)).indexOf("."))>-1?g=g.replace(".",""):l=g.length}for(d=0;48===g.charCodeAt(d);d++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(d,++m)){if(m-=d,p&&j.DEBUG&&m>15&&(e>h||e!==c(e)))throw Error(u+v.s*e);if((l=l-d-1)>T)v.c=v.e=null;else if(l=C)?_(c,a):E(c,a,"0");else if(o=(e=z(new j(e),t,r)).e,s=(c=y(e.c)).length,1==n||2==n&&(t<=o||o<=M)){for(;ss){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-s)>0)for(o+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function F(e,t){for(var r,n=1,i=new j(e[0]);n=10;i/=10,n++);return(r=n+r*f-1)>T?e.c=e.e=null:r=10;l/=10,i++);if((o=t-i)<0)o+=f,a=t,m=(u=g[h=0])/v[i-a-1]%10|0;else if((h=s((o+1)/f))>=g.length){if(!n)break e;for(;g.length<=h;g.push(0));u=m=0,i=1,a=(o%=f)-f+1}else{for(u=l=g[h],i=1;l>=10;l/=10,i++);m=(a=(o%=f)-f+i)<0?0:u/v[i-a-1]%10|0}if(n=n||t<0||null!=g[h+1]||(a<0?u:u%v[i-a-1]),n=r<4?(m||n)&&(0==r||r==(e.s<0?3:2)):m>5||5==m&&(4==r||n||6==r&&(o>0?a>0?u/v[i-a]:0:g[h-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=v[(f-t%f)%f],e.e=-t||0):g[0]=e.e=0,e;if(0==o?(g.length=h,l=1,h--):(g.length=h+1,l=v[f-o],g[h]=a>0?c(u/v[i-a]%v[a])*l:0),n)for(;;){if(0==h){for(o=1,a=g[0];a>=10;a/=10,o++);for(a=g[0]+=l,l=1;a>=10;a/=10,l++);o!=l&&(e.e++,g[0]==d&&(g[0]=1));break}if(g[h]+=l,g[h]!=d)break;g[h--]=0,l=1}for(o=g.length;0===g[--o];g.pop());}e.e>T?e.c=e.e=null:e.e=C?_(t,r):E(t,r,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(l+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,g,t),S=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),A=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-g,0,t),w(r[1],0,g,t),M=r[0],C=r[1]):(w(r,-g,g,t),M=-(C=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-g,-1,t),w(r[1],1,g,t),I=r[0],T=r[1];else{if(w(r,-g,g,t),!r)throw Error(l+t+" cannot be zero: "+r);I=-(T=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(l+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw P=!r,Error(l+"crypto unavailable");P=r}else P=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),O=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,g,t),R=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(l+t+" not an object: "+r);N=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(l+t+" invalid: "+r);L="0123456789"==r.slice(0,10),B=r}}return{DECIMAL_PLACES:S,ROUNDING_MODE:A,EXPONENTIAL_AT:[M,C],RANGE:[I,T],CRYPTO:P,MODULO_MODE:O,POW_PRECISION:R,FORMAT:N,ALPHABET:B}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===c(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%f)<1&&(t+=f),String(n[0]).length==t){for(t=0;t=d||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(l+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return F(arguments,o.lt)},j.minimum=j.min=function(){return F(arguments,o.gt)},j.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return c(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,n,i,o,a,u=0,d=[],h=new j(k);if(null==e?e=S:w(e,0,g),o=s(e/f),P)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));u>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[u]=n[0],r[u+1]=n[1]):(d.push(a%1e14),u+=2);u=o/2}else{if(!crypto.randomBytes)throw P=!1,Error(l+"crypto unavailable");for(r=crypto.randomBytes(o*=7);u=9e15?crypto.randomBytes(7).copy(r,u):(d.push(a%1e14),u+=7);u=o/7}if(!P)for(;u=10;a/=10,u++);ur-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var c,l,u,d,f,h,p,m,g=n.indexOf("."),v=S,b=A;for(g>=0&&(d=R,R=0,n=n.replace(".",""),h=(m=new j(i)).pow(n.length-g),R=d,m.c=t(E(y(h.c),h.e,"0"),10,o,e),m.e=m.c.length),u=d=(p=t(n,i,o,s?(c=B,e):(c=e,B))).length;0==p[--d];p.pop());if(!p[0])return c.charAt(0);if(g<0?--u:(h.c=p,h.e=u,h.s=a,p=(h=r(h,m,v,b,o)).c,f=h.r,u=h.e),g=p[l=u+v+1],d=o/2,f=f||l<0||null!=p[l+1],f=b<4?(null!=g||f)&&(0==b||b==(h.s<0?3:2)):g>d||g==d&&(4==b||f||6==b&&1&p[l-1]||b==(h.s<0?8:7)),l<1||!p[0])n=f?E(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(p.length=l,f)for(--o;++p[--l]>o;)p[l]=0,l||(++u,p=[1].concat(p));for(d=p.length;!p[--d];);for(g=0,n="";g<=d;n+=c.charAt(p[g++]));n=E(n,u,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,c=e.length,l=t%m,u=t/m|0;for(e=e.slice();c--;)s=((i=l*(o=e[c]%m)+(n=u*o+(a=e[c]/m|0)*l)%m*m+s)/r|0)+(n/m|0)+u*a,e[c]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,o,a,s){var l,u,h,p,m,g,y,b,w,x,_,E,k,S,A,M,C,I=n.s==i.s?1:-1,T=n.c,P=i.c;if(!T||!T[0]||!P||!P[0])return new j(n.s&&i.s&&(T?!P||T[0]!=P[0]:P)?T&&0==T[0]||!P?0*I:I/0:NaN);for(w=(b=new j(I)).c=[],I=o+(u=n.e-i.e)+1,s||(s=d,u=v(n.e/f)-v(i.e/f),I=I/f|0),h=0;P[h]==(T[h]||0);h++);if(P[h]>(T[h]||0)&&u--,I<0)w.push(1),p=!0;else{for(S=T.length,M=P.length,h=0,I+=2,(m=c(s/(P[0]+1)))>1&&(P=e(P,m,s),T=e(T,m,s),M=P.length,S=T.length),k=M,_=(x=T.slice(0,M)).length;_=s/2&&A++;do{if(m=0,(l=t(P,x,M,_))<0){if(E=x[0],M!=_&&(E=E*s+(x[1]||0)),(m=c(E/A))>1)for(m>=s&&(m=s-1),y=(g=e(P,m,s)).length,_=x.length;1==t(g,x,y,_);)m--,r(g,M=10;I/=10,h++);z(b,o+(b.e=h+u*f-1)+1,a,p)}else b.e=u,b.r=+p;return b}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,c){var u,d=s?a:a.replace(i,"");if(n.test(d))o.s=isNaN(d)?null:d<0?-1:1;else{if(!s&&(d=d.replace(e,(function(e,t,r){return u="x"==(r=r.toLowerCase())?16:"b"==r?2:8,c&&c!=u?e:t})),c&&(u=c,d=d.replace(t,"$1").replace(r,"0.$1")),a!=d))return new j(d,u);if(j.DEBUG)throw Error(l+"Not a"+(c?" base "+c:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},o.comparedTo=function(e,t){return b(this,new j(e,t))},o.decimalPlaces=o.dp=function(e,t){var r,n,i,o=this;if(null!=e)return w(e,0,g),null==t?t=A:w(t,0,8),z(new j(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-v(this.e/f))*f,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},o.dividedBy=o.div=function(e,t){return r(this,new j(e,t),S,A)},o.dividedToIntegerBy=o.idiv=function(e,t){return r(this,new j(e,t),0,1)},o.exponentiatedBy=o.pow=function(e,t){var r,n,i,o,a,u,d,h,p=this;if((e=new j(e)).c&&!e.isInteger())throw Error(l+"Exponent not an integer: "+Z(e));if(null!=t&&(t=new j(t)),a=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new j(Math.pow(+Z(p),a?e.s*(2-x(e)):+Z(e))),t?h.mod(t):h;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(n=!u&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&x(e)?-0:0,p.e>-1&&(o=1/o),new j(u?1/o:o);R&&(o=s(R/f+2))}for(a?(r=new j(.5),u&&(e.s=1),d=x(e)):d=(i=Math.abs(+Z(e)))%2,h=new j(k);;){if(d){if(!(h=h.times(p)).c)break;o?h.c.length>o&&(h.c.length=o):n&&(h=h.mod(t))}if(i){if(0===(i=c(i/2)))break;d=i%2}else if(z(e=e.times(r),e.e+1,1),e.e>14)d=x(e);else{if(0===(i=+Z(e)))break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}return n?h:(u&&(h=k.div(h)),t?h.mod(t):o?z(h,R,A,undefined):h)},o.integerValue=function(e){var t=new j(this);return null==e?e=A:w(e,0,8),z(t,t.e+1,e)},o.isEqualTo=o.eq=function(e,t){return 0===b(this,new j(e,t))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(e,t){return b(this,new j(e,t))>0},o.isGreaterThanOrEqualTo=o.gte=function(e,t){return 1===(t=b(this,new j(e,t)))||0===t},o.isInteger=function(){return!!this.c&&v(this.e/f)>this.c.length-2},o.isLessThan=o.lt=function(e,t){return b(this,new j(e,t))<0},o.isLessThanOrEqualTo=o.lte=function(e,t){return-1===(t=b(this,new j(e,t)))||0===t},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new j(e,t)).s,!s||!t)return new j(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/f,l=e.e/f,u=a.c,h=e.c;if(!c||!l){if(!u||!h)return u?(e.s=-t,e):new j(h?a:NaN);if(!u[0]||!h[0])return h[0]?(e.s=-t,e):new j(u[0]?a:3==A?-0:0)}if(c=v(c),l=v(l),u=u.slice(),s=c-l){for((o=s<0)?(s=-s,i=u):(l=c,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=u.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;u[r++]=0);for(t=d-1;n>s;){if(u[--n]=0;){for(r=0,p=E[i]%w,g=E[i]/w|0,o=i+(a=c);o>i;)r=((l=p*(l=_[--a]%w)+(s=g*l+(u=_[a]/w|0)*p)%w*w+y[o]+r)/b|0)+(s/w|0)+g*u,y[o--]=l%b;y[o]=r}return r?++n:y.splice(0,1),U(e,y,n)},o.negated=function(){var e=new j(this);return e.s=-e.s||null,e},o.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new j(e,t)).s,!i||!t)return new j(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/f,a=e.e/f,s=n.c,c=e.c;if(!o||!a){if(!s||!c)return new j(i/0);if(!s[0]||!c[0])return c[0]?e:new j(s[0]?n:0*i)}if(o=v(o),a=v(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d;return i&&(s=[i].concat(s),++a),U(e,s,a)},o.precision=o.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return w(e,1,g),null==t?t=A:w(t,0,8),z(new j(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*f+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},o.shiftedBy=function(e){return w(e,-h,h),this.times("1e"+e)},o.squareRoot=o.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,c=a.s,l=a.e,u=S+4,d=new j("0.5");if(1!==c||!s||!s[0])return new j(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+Z(a)))||c==1/0?(((t=y(s)).length+l)%2==0&&(t+="0"),c=Math.sqrt(+t),l=v((l+1)/2)-(l<0||l%2),n=new j(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new j(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(o=n,n=d.times(o.plus(r(a,o,u,1))),y(o.c).slice(0,c)===(t=y(n.c)).slice(0,c)){if(n.e0&&m>0){for(o=m%s||s,d=p.substr(0,o);o0&&(d+=u+p.slice(o)),h&&(d="-"+d)}n=f?d+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):d}return(r.prefix||"")+n+(r.suffix||"")},o.toFraction=function(e){var t,n,i,o,a,s,c,u,d,h,m,g,v=this,b=v.c;if(null!=e&&(!(c=new j(e)).isInteger()&&(c.c||1!==c.s)||c.lt(k)))throw Error(l+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+Z(c));if(!b)return new j(v);for(t=new j(k),d=n=new j(k),i=u=new j(k),g=y(b),a=t.e=g.length-v.e-1,t.c[0]=p[(s=a%f)<0?f+s:s],e=!e||c.comparedTo(t)>0?a>0?t:d:c,s=T,T=1/0,c=new j(g),u.c[0]=0;h=r(c,t,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,d=u.plus(h.times(o=d)),u=o,t=c.minus(h.times(o=t)),c=o;return o=r(e.minus(n),i,0,1),u=u.plus(o.times(d)),n=n.plus(o.times(i)),u.s=d.s=v.s,m=r(d,i,a*=2,A).minus(v).abs().comparedTo(r(u,n,a,A).minus(v).abs())<1?[d,i]:[u,n],T=s,m},o.toNumber=function(){return+Z(this)},o.toPrecision=function(e,t){return null!=e&&w(e,1,g),D(this,e,t,2)},o.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=M||o>=C?_(y(r.c),o):E(y(r.c),o,"0"):10===e&&L?t=E(y((r=z(new j(r),S+o+1,A)).c),r.e,"0"):(w(e,2,B.length,"Base"),t=n(E(y(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},o.valueOf=o.toJSON=function(){return Z(this)},o._isBigNumber=!0,null!=t&&j.set(t),j}(),o.default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},13313:(e,t,r)=>{const n=r(35992);function i(e,t,r){const n=e[t]+e[r];let i=e[t+1]+e[r+1];n>=4294967296&&i++,e[t]=n,e[t+1]=i}function o(e,t,r,n){let i=e[t]+r;r<0&&(i+=4294967296);let o=e[t+1]+n;i>=4294967296&&o++,e[t]=i,e[t+1]=o}function a(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,r,n,a,s){const c=d[a],l=d[a+1],f=d[s],h=d[s+1];i(u,e,t),o(u,e,c,l);let p=u[n]^u[e],m=u[n+1]^u[e+1];u[n]=m,u[n+1]=p,i(u,r,n),p=u[t]^u[r],m=u[t+1]^u[r+1],u[t]=p>>>24^m<<8,u[t+1]=m>>>24^p<<8,i(u,e,t),o(u,e,f,h),p=u[n]^u[e],m=u[n+1]^u[e+1],u[n]=p>>>16^m<<16,u[n+1]=m>>>16^p<<16,i(u,r,n),p=u[t]^u[r],m=u[t+1]^u[r+1],u[t]=m>>>31^p<<1,u[t+1]=p>>>31^m<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),l=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),u=new Uint32Array(32),d=new Uint32Array(32);function f(e,t){let r=0;for(r=0;r<16;r++)u[r]=e.h[r],u[r+16]=c[r];for(u[24]=u[24]^e.t,u[25]=u[25]^e.t/4294967296,t&&(u[28]=~u[28],u[29]=~u[29]),r=0;r<32;r++)d[r]=a(e.b,4*r);for(r=0;r<12;r++)s(0,8,16,24,l[16*r+0],l[16*r+1]),s(2,10,18,26,l[16*r+2],l[16*r+3]),s(4,12,20,28,l[16*r+4],l[16*r+5]),s(6,14,22,30,l[16*r+6],l[16*r+7]),s(0,10,20,30,l[16*r+8],l[16*r+9]),s(2,12,22,24,l[16*r+10],l[16*r+11]),s(4,14,16,26,l[16*r+12],l[16*r+13]),s(6,8,18,28,l[16*r+14],l[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^u[r]^u[r+16]}const h=new Uint8Array([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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(e,t,r,n){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&16!==r.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&16!==n.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};h.fill(0),h[0]=e,t&&(h[1]=t.length),h[2]=1,h[3]=1,r&&h.set(r,32),n&&h.set(n,48);for(let o=0;o<16;o++)i.h[o]=c[o]^a(h,4*o);return t&&(m(i,t),i.c=128),i}function m(e,t){for(let r=0;r>2]>>8*(3&r);return t}function v(e,t,r,i,o){r=r||64,e=n.normalizeInput(e),i&&(i=n.normalizeInput(i)),o&&(o=n.normalizeInput(o));const a=p(r,t,i,o);return m(a,e),g(a)}e.exports={blake2b:v,blake2bHex:function(e,t,r,i,o){const a=v(e,t,r,i,o);return n.toHex(a)},blake2bInit:p,blake2bUpdate:m,blake2bFinal:g}},48349:(e,t,r)=>{const n=r(35992);function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,r,n,i,o){l[e]=l[e]+l[t]+i,l[n]=a(l[n]^l[e],16),l[r]=l[r]+l[n],l[t]=a(l[t]^l[r],12),l[e]=l[e]+l[t]+o,l[n]=a(l[n]^l[e],8),l[r]=l[r]+l[n],l[t]=a(l[t]^l[r],7)}function a(e,t){return e>>>t^e<<32-t}const s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),l=new Uint32Array(16),u=new Uint32Array(16);function d(e,t){let r=0;for(r=0;r<8;r++)l[r]=e.h[r],l[r+8]=s[r];for(l[12]^=e.t,l[13]^=e.t/4294967296,t&&(l[14]=~l[14]),r=0;r<16;r++)u[r]=i(e.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,u[c[16*r+0]],u[c[16*r+1]]),o(1,5,9,13,u[c[16*r+2]],u[c[16*r+3]]),o(2,6,10,14,u[c[16*r+4]],u[c[16*r+5]]),o(3,7,11,15,u[c[16*r+6]],u[c[16*r+7]]),o(0,5,10,15,u[c[16*r+8]],u[c[16*r+9]]),o(1,6,11,12,u[c[16*r+10]],u[c[16*r+11]]),o(2,7,8,13,u[c[16*r+12]],u[c[16*r+13]]),o(3,4,9,14,u[c[16*r+14]],u[c[16*r+15]]);for(r=0;r<8;r++)e.h[r]^=l[r]^l[r+8]}function f(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=t?t.length:0;if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(s),b:new Uint8Array(64),c:0,t:0,outlen:e};return n.h[0]^=16842752^r<<8^e,r>0&&(h(n,t),n.c=64),n}function h(e,t){for(let r=0;r>2]>>8*(3&r)&255;return t}function m(e,t,r){r=r||32,e=n.normalizeInput(e);const i=f(r,t);return h(i,e),p(i)}e.exports={blake2s:m,blake2sHex:function(e,t,r){const i=m(e,t,r);return n.toHex(i)},blake2sInit:f,blake2sUpdate:h,blake2sFinal:p}},13152:(e,t,r)=>{const n=r(13313),i=r(48349);e.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},35992:e=>{const t="Input must be an string, Buffer or Uint8Array";function r(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let r;if(e instanceof Uint8Array)r=e;else{if("string"!==typeof e)throw new Error(t);r=(new TextEncoder).encode(e)}return r},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,t,n){let i="\n"+e+" = ";for(let o=0;o=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),c=t;c=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(C){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?f[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],u=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(e);r=(d=d.idivn(u)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,d=67108863&c,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,_=0|a[4],E=8191&_,k=_>>>13,S=0|a[5],A=8191&S,M=S>>>13,C=0|a[6],I=8191&C,T=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,N=0|a[8],B=8191&N,L=N>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,Z=U>>>13,q=0|s[1],H=8191&q,V=q>>>13,W=0|s[2],$=8191&W,K=W>>>13,G=0|s[3],Y=8191&G,J=G>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,le=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,Z))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,Z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,Z))+Math.imul(m,z)|0,o=Math.imul(m,Z);var ve=(l+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,Z))+Math.imul(y,z)|0,o=Math.imul(y,Z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,V)|0;var ye=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,Z))+Math.imul(x,z)|0,o=Math.imul(x,Z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Y)|0))<<13)|0;l=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,Z))+Math.imul(k,z)|0,o=Math.imul(k,Z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0;var we=(l+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,Z))+Math.imul(M,z)|0,o=Math.imul(M,Z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var xe=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;l=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,Z))+Math.imul(T,z)|0,o=Math.imul(T,Z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,Z))+Math.imul(R,z)|0,o=Math.imul(R,Z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ce)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,Z))+Math.imul(L,z)|0,o=Math.imul(L,Z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(l+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,Z))+Math.imul(F,z)|0,o=Math.imul(F,Z),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Se=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,V))+Math.imul(F,H)|0,o=Math.imul(F,V),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,le)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ae=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,K))+Math.imul(F,$)|0,o=Math.imul(F,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Me=(l+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;l=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,J))+Math.imul(F,Y)|0,o=Math.imul(F,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,le)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ce=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,le)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,fe)|0;var Te=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(T,pe)|0))<<13)|0;l=((o=o+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,ce),i=(i=Math.imul(D,le))+Math.imul(F,ce)|0,o=Math.imul(F,le),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,fe)|0;var Oe=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,de),i=(i=Math.imul(D,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(l+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(L,pe)|0))<<13)|0;l=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(l+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=ge,c[1]=ve,c[2]=ye,c[3]=be,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=ke,c[9]=Se,c[10]=Ae,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=Te,c[15]=Pe,c[16]=Oe,c[17]=Re,c[18]=Ne,0!==l&&(c[19]=l,r.length++),r};function v(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(e,t,r){return v(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?m(this,e,t):r<1024?v(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var l=0;l=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(l)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},i(_,x),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return w[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var d=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,A),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},32604:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r{var n=r(38608).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^u[p>>>16&255]^d[m>>>8&255]^f[255&g]^t[v++],a=l[p>>>24]^u[m>>>16&255]^d[g>>>8&255]^f[255&h]^t[v++],s=l[m>>>24]^u[g>>>16&255]^d[h>>>8&255]^f[255&p]^t[v++],c=l[g>>>24]^u[h>>>16&255]^d[p>>>8&255]^f[255&m]^t[v++],h=o,p=a,m=s,g=c;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^t[v++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&h])^t[v++],s=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[v++],c=(n[g>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[v++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var l=s^s<<1^s<<2^s<<3^s<<4;l=l>>>8^255&l^99,r[a]=l,n[l]=a;var u=e[a],d=e[u],f=e[d],h=257*e[l]^16843008*l;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*f^65537*d^257*u^16843008*a,o[0][l]=h<<24|h>>>8,o[1][l]=h<<16|h>>>16,o[2][l]=h<<8|h>>>24,o[3][l]=h,0===a?a=s=1:(a=u^e[e[e[f^u]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function l(e){this._key=i(e),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t===4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),i[o]=i[o-t]^a}for(var l=[],u=0;u>>24]]^c.INV_SUB_MIX[1][c.SBOX[f>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[f>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&f]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},l.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},l.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},l.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=l},48928:(e,t,r)=>{var n=r(80144),i=r(38608).Buffer,o=r(36894),a=r(47110),s=r(9537),c=r(50767),l=r(28333);function u(e,t,r,a){o.call(this);var c=i.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(c);this._ghash=new s(u),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var c=8*o,u=i.alloc(8);u.writeUIntBE(c,0,8),n.update(u),e._finID=n.state;var d=i.from(e._finID);return l(d),d}(this,r,u),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(u,o),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i{var n=r(77954),i=r(19092),o=r(44946);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},19092:(e,t,r)=>{var n=r(48928),i=r(38608).Buffer,o=r(4486),a=r(715),s=r(36894),c=r(80144),l=r(23523);function u(e,t,r){s.call(this),this._cache=new d,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function d(){this.cache=i.allocUnsafe(0)}function f(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"===typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new u(s.module,t,r)}r(47110)(u,s),u.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=l(t,!1,r.key,r.iv);return f(e,n.key,n.iv)},t.createDecipheriv=f},77954:(e,t,r)=>{var n=r(4486),i=r(48928),o=r(38608).Buffer,a=r(715),s=r(36894),c=r(80144),l=r(23523);function u(e,t,r){s.call(this),this._cache=new f,this._cipher=new c.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(47110)(u,s),u.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var d=o.alloc(16,16);function f(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new u(s.module,t,r)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=o.concat([this.cache,e])},f.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},f.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r{var n=r(38608).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},28333:e=>{e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},9875:(e,t,r)=>{var n=r(50767);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},98210:(e,t,r)=>{var n=r(38608).Buffer,i=r(50767);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},96547:(e,t,r)=>{var n=r(38608).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s{var n=r(38608).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s{var n=r(50767),i=r(38608).Buffer,o=r(28333);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;s{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},4486:(e,t,r)=>{var n={ECB:r(47119),CBC:r(9875),CFB:r(98210),CFB8:r(21126),CFB1:r(96547),OFB:r(86742),CTR:r(83879),GCM:r(83879)},i=r(44946);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},86742:(e,t,r)=>{var n=r(30261).Buffer,i=r(50767);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{var n=r(80144),i=r(38608).Buffer,o=r(36894);function a(e,t,r,a){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}r(47110)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},76038:(e,t,r)=>{var n=r(60617),i=r(96436),o=r(4486),a=r(60035),s=r(23523);function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function l(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return c(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=c,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return l(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=l,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},60617:(e,t,r)=>{var n=r(36894),i=r(88994),o=r(47110),a=r(38608).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function c(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var c=e.iv;a.isBuffer(c)||(c=a.from(c)),this._des=i.create({key:o,iv:c,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=c,o(c,n),c.prototype._update=function(e){return a.from(this._des.update(e))},c.prototype._final=function(){return a.from(this._des.final())}},60035:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},41191:(e,t,r)=>{var n=r(30261).Buffer,i=r(45081),o=r(76581);function a(e){var t,r=e.modulus.byteLength();do{t=new i(o(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=a(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),s=new i(e).mul(r.blinder).umod(t.modulus),c=s.toRed(i.mont(t.prime1)),l=s.toRed(i.mont(t.prime2)),u=t.coefficient,d=t.prime1,f=t.prime2,h=c.redPow(t.exponent1).fromRed(),p=l.redPow(t.exponent2).fromRed(),m=h.isub(p).imul(u).umod(d).imul(f);return p.iadd(m).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}s.getr=a,e.exports=s},61578:(e,t,r)=>{e.exports=r(75207)},97321:(e,t,r)=>{var n=r(38608).Buffer,i=r(46764),o=r(87488),a=r(47110),s=r(76540),c=r(52919),l=r(75207);function u(e){o.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){o.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){return new u(e)}function h(e){return new d(e)}Object.keys(l).forEach((function(e){l[e].id=n.from(l[e].id,"hex"),l[e.toLowerCase()]=l[e]})),a(u,o.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(d,o.Writable),d.prototype._write=function(e,t,r){this._hash.update(e),r()},d.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},d.prototype.verify=function(e,t,r){"string"===typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return c(t,i,e,this._signType,this._tag)},e.exports={Sign:f,Verify:h,createSign:f,createVerify:h}},76540:(e,t,r)=>{var n=r(38608).Buffer,i=r(65207),o=r(41191),a=r(40632).ec,s=r(45081),c=r(68821),l=r(1308);function u(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function f(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length{var n=r(38608).Buffer,i=r(45081),o=r(40632).ec,a=r(68821),s=r(1308);function c(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,r,l,u){var d=a(r);if("ec"===d.type){if("ecdsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,d)}if("dsa"===d.type){if("dsa"!==l)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,l=r.data.pub_key,u=a.signature.decode(e,"der"),d=u.s,f=u.r;c(d,o),c(f,o);var h=i.mont(n),p=d.invm(o),m=s.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(l.toRed(h).redPow(f.mul(p).mod(o)).fromRed()).mod(n).mod(o);return 0===m.cmp(f)}(e,t,d)}if("rsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");t=n.concat([u,t]);for(var f=d.modulus.byteLength(),h=[1],p=0;t.length+h.length+2{var n=r(30261).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o{"use strict";const n=r(84505),i=r(74574),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return l(e,t,r)}function l(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||Y(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),s(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(i)return n?-1:W(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128===(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128===(192&r)&&128===(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128===(192&r)&&128===(192&n)&&128===(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(G(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),l=this.slice(n,i),u=e.slice(t,r);for(let c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const M=4096;function C(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i){Z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function B(e,t,r,n,i){Z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Z(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function q(e,t){if("number"!==typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw q(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function W(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function $(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!==e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"===typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},36894:(e,t,r)=>{var n=r(38608).Buffer,i=r(21584).Transform,o=r(71778).s;function a(e){i.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(47110)(a,i),a.prototype.update=function(e,t,r){"string"===typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){n=i}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},38482:(e,t,r)=>{"use strict";function n(e){var t,r,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ti});const i=function(){for(var e,t,r=0,i="";r{"use strict";var n=r(22455),i={"text/plain":"Text","text/html":"Url",default:"Text"},o="Copy to clipboard: #{key}, Enter";e.exports=function(e,t){var r,a,s,c,l,u,d=!1;t||(t={}),r=t.debug||!1;try{if(s=n(),c=document.createRange(),l=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),"undefined"===typeof n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),l.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(f){r&&console.error("unable to copy using clipboardData: ",f),r&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:o),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(c):l.removeAllRanges()),u&&document.body.removeChild(u),s()}return d}},73301:(e,t,r)=>{var n=r(30261).Buffer,i=r(40632),o=r(53520);e.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function c(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,d=67108863&c,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,l=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,_=0|a[4],E=8191&_,k=_>>>13,S=0|a[5],A=8191&S,M=S>>>13,C=0|a[6],I=8191&C,T=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,N=0|a[8],B=8191&N,L=N>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,Z=U>>>13,q=0|s[1],H=8191&q,V=q>>>13,W=0|s[2],$=8191&W,K=W>>>13,G=0|s[3],Y=8191&G,J=G>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,le=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,Z))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,Z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,Z))+Math.imul(m,z)|0,o=Math.imul(m,Z);var ve=(l+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,Z))+Math.imul(y,z)|0,o=Math.imul(y,Z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,V)|0;var ye=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,Z))+Math.imul(x,z)|0,o=Math.imul(x,Z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Y)|0))<<13)|0;l=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,Z))+Math.imul(k,z)|0,o=Math.imul(k,Z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0;var we=(l+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,Z))+Math.imul(M,z)|0,o=Math.imul(M,Z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var xe=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;l=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,Z))+Math.imul(T,z)|0,o=Math.imul(T,Z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,Z))+Math.imul(R,z)|0,o=Math.imul(R,Z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ce)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,Z))+Math.imul(L,z)|0,o=Math.imul(L,Z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(l+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,Z))+Math.imul(F,z)|0,o=Math.imul(F,Z),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Se=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,V))+Math.imul(F,H)|0,o=Math.imul(F,V),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,le)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ae=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,K))+Math.imul(F,$)|0,o=Math.imul(F,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Me=(l+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;l=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,J))+Math.imul(F,Y)|0,o=Math.imul(F,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,le)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ce=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,le)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,fe)|0;var Te=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(T,pe)|0))<<13)|0;l=((o=o+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,ce),i=(i=Math.imul(D,le))+Math.imul(F,ce)|0,o=Math.imul(F,le),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,fe)|0;var Oe=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,de),i=(i=Math.imul(D,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(l+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(L,pe)|0))<<13)|0;l=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(l+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=ge,c[1]=ve,c[2]=ye,c[3]=be,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=ke,c[9]=Se,c[10]=Ae,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=Te,c[15]=Pe,c[16]=Oe,c[17]=Re,c[18]=Ne,0!==l&&(c[19]=l,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var l=0;l=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(l)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var d=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},46764:(e,t,r)=>{"use strict";var n=r(47110),i=r(49137),o=r(78816),a=r(7372),s=r(36894);function c(e){s.call(this,"digest"),this._hash=e}n(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(a(e))}},6199:(e,t,r)=>{var n=r(49137);e.exports=function(e){return(new n).update(e).digest()}},65207:(e,t,r)=>{"use strict";var n=r(47110),i=r(12223),o=r(36894),a=r(38608).Buffer,s=r(6199),c=r(78816),l=r(7372),u=a.alloc(128);function d(e,t){o.call(this,"digest"),"string"===typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new c:l(e)).update(t).digest():t.length{"use strict";var n=r(47110),i=r(38608).Buffer,o=r(36894),a=i.alloc(128),s=64;function c(e,t){o.call(this,"digest"),"string"===typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length-1};function o(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!==typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function u(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function d(e){var t=new FileReader,r=u(t);return t.readAsArrayBuffer(e),r}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||i(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=u(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function g(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function v(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t}function y(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},h.call(m.prototype),h.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];y.redirect=function(e,t){if(-1===b.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(x){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function w(e,n){return new Promise((function(i,o){var a=new m(e,n);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:v(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;i(new y(t,e))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&r.blob&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof a._bodyInit?null:a._bodyInit)}))}w.polyfill=!0,e.fetch||(e.fetch=w,e.Headers=c,e.Request=m,e.Response=y),t.Headers=c,t.Request=m,t.Response=y,t.fetch=w,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!==typeof self?self:this)},31866:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(76581),t.createHash=t.Hash=r(46764),t.createHmac=t.Hmac=r(65207);var n=r(61578),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(7062);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(76038);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=r(22412);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var l=r(97321);t.createSign=l.createSign,t.Sign=l.Sign,t.createVerify=l.createVerify,t.Verify=l.Verify,t.createECDH=r(73301);var u=r(19568);t.publicEncrypt=u.publicEncrypt,t.privateEncrypt=u.privateEncrypt,t.publicDecrypt=u.publicDecrypt,t.privateDecrypt=u.privateDecrypt;var d=r(73838);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},27860:e=>{function t(e,t,r){var n,i,o,a,s;function c(){var l=Date.now()-a;l=0?n=setTimeout(c,t-l):(n=null,r||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var l=function(){o=this,i=arguments,a=Date.now();var l=r&&!n;return n||(n=setTimeout(c,t)),l&&(s=e.apply(o,i),o=i=null),s};return l.clear=function(){n&&(clearTimeout(n),n=null)},l.flush=function(){n&&(s=e.apply(o,i),o=i=null,clearTimeout(n),n=null)},l}t.debounce=t,e.exports=t},17155:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(o){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],i(r),i(n))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r)||[],n=1;n{"use strict";t.utils=r(49915),t.Cipher=r(17748),t.DES=r(78506),t.CBC=r(94205),t.EDE=r(26818)},94205:(e,t,r)=>{"use strict";var n=r(13859),i=r(47110),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t{"use strict";var n=r(13859);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t{"use strict";var n=r(13859),i=r(47110),o=r(49915),a=r(17748);function s(){this.tmp=new Array(2),this.keys=null}function c(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(c,a),e.exports=c,c.create=function(e){return new c(e)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];c.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},c.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=f}o.rip(s,a,n,i)},c.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,c=e.keys.length-2;c>=0;c-=2){var l=e.keys[c],u=e.keys[c+1];o.expand(a,e.tmp,0),l^=e.tmp[0],u^=e.tmp[1];var d=o.substitute(l,u),f=a;a=(s^o.permute(d))>>>0,s=f}o.rip(a,s,n,i)}},26818:(e,t,r)=>{"use strict";var n=r(13859),i=r(47110),o=r(17748),a=r(78506);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function c(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(c,o),e.exports=c,c.create=function(e){return new c(e)},c.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},c.prototype._pad=a.prototype._pad,c.prototype._unpad=a.prototype._unpad},49915:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,c=0;c>>r[c]&1;for(c=s;c>>r[c]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)]}return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length{"use strict";r.d(t,{qY:()=>p});var n=r(54501),i=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i{var n=r(30261).Buffer,i=r(38976),o=r(29799),a=r(87832);var s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new a(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,c){return n.isBuffer(r)||void 0===s[r]?e(t,"binary",r,o):(r=r||"binary",c=c||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,c)),"number"===typeof t?new a(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new a(t,o,!0)))}},87832:(e,t,r)=>{var n=r(30261).Buffer,i=r(21822),o=new(r(43970)),a=new i(24),s=new i(11),c=new i(10),l=new i(3),u=new i(7),d=r(38976),f=r(76581);function h(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=g;var m={};function g(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=p):this._primeCode=8}function v(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!==typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in m)return m[n];var i,f=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!o.test(e))return f+=1,f+="02"===r||"05"===r?8:4,m[n]=f,f;switch(o.test(e.shrn(1))||(f+=2),r){case"02":e.mod(a).cmp(s)&&(f+=8);break;case"05":(i=e.mod(c)).cmp(l)&&i.cmp(u)&&(f+=8);break;default:f+=4}return m[n]=f,f}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new i(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.toArray()),o=this.getPrime();if(r.length{var n=r(76581);e.exports=y,y.simpleSieve=g,y.fermatTest=v;var i=r(21822),o=new i(24),a=new(r(43970)),s=new i(1),c=new i(2),l=new i(5),u=(new i(16),new i(8),new i(10)),d=new i(3),f=(new i(7),new i(11)),h=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;ie;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(l))for(;r.mod(u).cmp(d);)r.iadd(h)}else for(;r.mod(o).cmp(f);)r.iadd(h);if(g(p=r.shrn(1))&&g(r)&&v(p)&&v(r)&&a.test(p)&&a.test(r))return r}}},21822:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(7748).Buffer}catch(S){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,d=67108863&c,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,l=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,_=0|a[4],E=8191&_,k=_>>>13,S=0|a[5],A=8191&S,M=S>>>13,C=0|a[6],I=8191&C,T=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,N=0|a[8],B=8191&N,L=N>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,Z=U>>>13,q=0|s[1],H=8191&q,V=q>>>13,W=0|s[2],$=8191&W,K=W>>>13,G=0|s[3],Y=8191&G,J=G>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,le=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,Z))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,Z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,Z))+Math.imul(m,z)|0,o=Math.imul(m,Z);var ve=(l+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,Z))+Math.imul(y,z)|0,o=Math.imul(y,Z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,V)|0;var ye=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,Z))+Math.imul(x,z)|0,o=Math.imul(x,Z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Y)|0))<<13)|0;l=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,Z))+Math.imul(k,z)|0,o=Math.imul(k,Z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0;var we=(l+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,Z))+Math.imul(M,z)|0,o=Math.imul(M,Z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var xe=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;l=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,Z))+Math.imul(T,z)|0,o=Math.imul(T,Z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,Z))+Math.imul(R,z)|0,o=Math.imul(R,Z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ce)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,Z))+Math.imul(L,z)|0,o=Math.imul(L,Z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(l+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,Z))+Math.imul(F,z)|0,o=Math.imul(F,Z),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Se=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,V))+Math.imul(F,H)|0,o=Math.imul(F,V),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,le)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ae=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,K))+Math.imul(F,$)|0,o=Math.imul(F,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Me=(l+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;l=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,J))+Math.imul(F,Y)|0,o=Math.imul(F,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,le)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ce=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,le)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,fe)|0;var Te=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(T,pe)|0))<<13)|0;l=((o=o+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,ce),i=(i=Math.imul(D,le))+Math.imul(F,ce)|0,o=Math.imul(F,le),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,fe)|0;var Oe=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,de),i=(i=Math.imul(D,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(l+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(L,pe)|0))<<13)|0;l=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(l+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=ge,c[1]=ve,c[2]=ye,c[3]=be,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=ke,c[9]=Se,c[10]=Ae,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=Te,c[15]=Pe,c[16]=Oe,c[17]=Re,c[18]=Ne,0!==l&&(c[19]=l,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var l=0;l=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(l)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var d=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},59311:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i={},o={};o[r]=0;var a,s,c,l,u,d,f,h=t.PriorityQueue.make();for(h.push(r,0);!h.empty();)for(c in s=(a=h.pop()).value,l=a.cost,u=e[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],f=o[c],("undefined"===typeof o[c]||f>d)&&(o[c]=d,h.push(c,d),i[c]=s));if("undefined"!==typeof n&&"undefined"===typeof o[n]){var p=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,i={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},40632:(e,t,r)=>{"use strict";var n=t;n.version=r(18597).i8,n.utils=r(21185),n.rand=r(32604),n.curve=r(94531),n.curves=r(58946),n.ec=r(21135),n.eddsa=r(13661)},93539:(e,t,r)=>{"use strict";var n=r(45794),i=r(21185),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;u--)c=(c<<1)+n[u];l.push(c)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;l--){for(var u=0;l>=0&&0===a[l];l--)u++;if(l>=0&&u++,c=c.dblp(u),l<0)break;var d=a[l];s(0!==d),c="affine"===e.type?d>0?c.mixedAdd(i[d-1>>1]):c.mixedAdd(i[-d-1>>1].neg()):d>0?c.add(i[d-1>>1]):c.add(i[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){var s,c,l,u=this._wnafT1,d=this._wnafT2,f=this._wnafT3,h=0;for(s=0;s=1;s-=2){var m=s-1,g=s;if(1===u[m]&&1===u[g]){var v=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(v[1]=t[m].add(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].add(t[g].neg())):(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[m],r[g]);for(h=Math.max(b[0].length,h),f[m]=new Array(h),f[g]=new Array(h),c=0;c=0;s--){for(var k=0;s>=0;){var S=!0;for(c=0;c=0&&k++,_=_.dblp(k),s<0)break;for(c=0;c0?l=d[c][A-1>>1]:A<0&&(l=d[c][-A-1>>1].neg()),_="affine"===l.type?_.mixedAdd(l):_.add(l))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},l.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i{"use strict";var n=r(21185),i=r(45794),o=r(47110),a=r(93539),s=n.assert;function c(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function l(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(l,a.BasePoint),c.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new l(this,e,t,r,n)},l.fromJSON=function(e,t){return new l(e,t[0],t[1],t[2])},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},l.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),l=o.redMul(s),u=i.redMul(s),d=a.redMul(o);return this.curve.point(c,l,d,u)},l.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var l=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(l.redSub(this.curve.two)),t=l.redMul(n.redSub(c)),r=l.redSqr().redSub(l).redSub(l)):(i=this.z.redSqr(),o=l.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=l.redMul(n.redSub(c)),r=l.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),l=o.redMul(a),u=s.redMul(c),d=o.redMul(c),f=a.redMul(s);return this.curve.point(l,u,f,d)},l.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),l=i.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(c).redMul(u);return this.curve.twisted?(t=n.redMul(l).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(l)):(t=n.redMul(l).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(l)),this.curve.point(d,t,r)},l.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},l.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},l.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},l.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},94531:(e,t,r)=>{"use strict";var n=t;n.base=r(93539),n.short=r(61040),n.mont=r(5575),n.edwards=r(53423)},5575:(e,t,r)=>{"use strict";var n=r(45794),i=r(47110),o=r(93539),a=r(21185);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},61040:(e,t,r)=>{"use strict";var n=r(21185),i=r(45794),o=r(47110),a=r(93539),s=n.assert;function c(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,c,l,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),v=new i(1),y=0;0!==f.cmpn(0);){var b=h.div(f);l=h.sub(b.mul(f)),u=g.sub(b.mul(p));var w=v.sub(b.mul(m));if(!n&&l.cmp(d)<0)t=c.neg(),r=p,n=l.neg(),o=u;else if(n&&2===++y)break;c=l,h=f,f=l,g=p,p=u,v=m,m=w}a=l.neg(),s=u;var x=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(x)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),l=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(l).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},l.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},l.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},l.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},l.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,a.BasePoint),c.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),u=l.redMul(s),d=n.redMul(l),f=c.redSqr().redIAdd(u).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),u=r.redMul(c),d=s.redSqr().redIAdd(l).redISub(u).redISub(u),f=s.redMul(u.redISub(d)).redISub(i.redMul(l)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},58946:(e,t,r)=>{"use strict";var n,i=t,o=r(99950),a=r(94531),s=r(21185).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(81086)}catch(u){n=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},21135:(e,t,r)=>{"use strict";var n=r(45794),i=r(47690),o=r(21185),a=r(58946),s=r(32604),c=o.assert,l=r(10853),u=r(65333);function d(e){if(!(this instanceof d))return new d(e);"string"===typeof e&&(c(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new l(this,e)},d.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),l=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),f=0;;f++){var h=o.k?o.k(f):new n(l.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new u({r:g,s:v,recoveryParam:y})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),l=c.mul(e).umod(this.n),d=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){c((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,a=new n(e),s=t.r,l=t.s,d=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),m=l.mul(h).umod(o);return this.g.mulAdd(p,s,m)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},10853:(e,t,r)=>{"use strict";var n=r(45794),i=r(21185).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},65333:(e,t,r)=>{"use strict";var n=r(45794),i=r(21185),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function l(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=c(e,r);if(!1===a)return!1;var l=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var u=c(e,r);if(!1===u)return!1;if(e.length!==u+r.place)return!1;var d=e.slice(r.place,u+r.place);if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(l),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=l(t),r=l(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var o=n.concat(r),a=[48];return u(a,o.length),a=a.concat(o),i.encode(a,e)}},13661:(e,t,r)=>{"use strict";var n=r(99950),i=r(58946),o=r(21185),a=o.assert,s=o.parseBytes,c=r(60493),l=r(46352);function u(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),c=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},u.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=r(21185),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},46352:(e,t,r)=>{"use strict";var n=r(45794),i=r(21185),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function c(e,t){this.eddsa=e,"object"!==typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},81086:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},21185:(e,t,r)=>{"use strict";var n=t,i=r(45794),o=r(13859),a=r(99475);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,l=t.andln(3)+o&3;3===c&&(c=-1),3===l&&(l=-1),a=0===(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==l?c:-c,r[0].push(a),s=0===(1&l)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?l:-l,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},45794:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(85568).Buffer}catch(S){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,d=67108863&c,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,l=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,_=0|a[4],E=8191&_,k=_>>>13,S=0|a[5],A=8191&S,M=S>>>13,C=0|a[6],I=8191&C,T=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,N=0|a[8],B=8191&N,L=N>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,Z=U>>>13,q=0|s[1],H=8191&q,V=q>>>13,W=0|s[2],$=8191&W,K=W>>>13,G=0|s[3],Y=8191&G,J=G>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,le=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,Z))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,Z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,Z))+Math.imul(m,z)|0,o=Math.imul(m,Z);var ve=(l+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,Z))+Math.imul(y,z)|0,o=Math.imul(y,Z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,V)|0;var ye=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,Z))+Math.imul(x,z)|0,o=Math.imul(x,Z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Y)|0))<<13)|0;l=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,Z))+Math.imul(k,z)|0,o=Math.imul(k,Z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0;var we=(l+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,Z))+Math.imul(M,z)|0,o=Math.imul(M,Z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var xe=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;l=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,Z))+Math.imul(T,z)|0,o=Math.imul(T,Z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,Z))+Math.imul(R,z)|0,o=Math.imul(R,Z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ce)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,Z))+Math.imul(L,z)|0,o=Math.imul(L,Z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(l+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,Z))+Math.imul(F,z)|0,o=Math.imul(F,Z),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Se=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,V))+Math.imul(F,H)|0,o=Math.imul(F,V),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,le)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ae=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,K))+Math.imul(F,$)|0,o=Math.imul(F,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Me=(l+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;l=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,J))+Math.imul(F,Y)|0,o=Math.imul(F,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,le)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ce=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,le)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,fe)|0;var Te=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(T,pe)|0))<<13)|0;l=((o=o+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,ce),i=(i=Math.imul(D,le))+Math.imul(F,ce)|0,o=Math.imul(F,le),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,fe)|0;var Oe=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,de),i=(i=Math.imul(D,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(l+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(L,pe)|0))<<13)|0;l=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(l+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=ge,c[1]=ve,c[2]=ye,c[3]=be,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=ke,c[9]=Se,c[10]=Ae,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=Te,c[15]=Pe,c[16]=Oe,c[17]=Re,c[18]=Ne,0!==l&&(c[19]=l,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var l=0;l=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(l)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var d=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},51086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>P,BigNumber:()=>f.O$,Contract:()=>O,ContractFactory:()=>R,FixedNumber:()=>N.xs,Signer:()=>u.E,VoidSigner:()=>u.b,Wallet:()=>B.Wallet,Wordlist:()=>tr.D,constants:()=>n,errors:()=>g.ErrorCode,ethers:()=>a,getDefaultProvider:()=>Qt,logger:()=>br,providers:()=>i,utils:()=>o,version:()=>yr,wordlists:()=>er.E});var n={};r.r(n),r.d(n,{AddressZero:()=>L,EtherSymbol:()=>F,HashZero:()=>D.R,MaxInt256:()=>j.PS,MaxUint256:()=>j.Bz,MinInt256:()=>j.$B,NegativeOne:()=>j.tL,One:()=>j.fh,Two:()=>j.Py,WeiPerEther:()=>j.Ce,Zero:()=>j._Y});var i={};r.r(i),r.d(i,{AlchemyProvider:()=>ot,AlchemyWebSocketProvider:()=>it,AnkrProvider:()=>lt,BaseProvider:()=>Oe,CloudflareProvider:()=>ft,EtherscanProvider:()=>wt,FallbackProvider:()=>Lt,Formatter:()=>ie,InfuraProvider:()=>zt,InfuraWebSocketProvider:()=>Ut,IpcProvider:()=>jt,JsonRpcBatchProvider:()=>Zt,JsonRpcProvider:()=>We,JsonRpcSigner:()=>qe,NodesmithProvider:()=>Ht,PocketProvider:()=>$t,Provider:()=>l.zt,Resolver:()=>Ie,StaticJsonRpcProvider:()=>et,UrlJsonRpcProvider:()=>tt,Web3Provider:()=>Jt,WebSocketProvider:()=>Je,getDefaultProvider:()=>Qt,getNetwork:()=>$,isCommunityResourcable:()=>oe,isCommunityResource:()=>ae,showThrottleMessage:()=>ce});var o={};r.r(o),r.d(o,{AbiCoder:()=>rr.R,ConstructorFragment:()=>nr.Xg,ErrorFragment:()=>nr.IC,EventFragment:()=>nr.QV,FormatTypes:()=>nr.pc,Fragment:()=>nr.HY,FunctionFragment:()=>nr.YW,HDNode:()=>sr.HDNode,Indexed:()=>c.Hk,Interface:()=>c.vU,LogDescription:()=>c.CC,Logger:()=>g.Logger,ParamType:()=>nr._R,RLP:()=>fr,SigningKey:()=>hr.SigningKey,SupportedAlgorithm:()=>vr.p,TransactionDescription:()=>c.vk,TransactionTypes:()=>m.TransactionTypes,UnicodeNormalizationForm:()=>X.Uj,Utf8ErrorFuncs:()=>X.te,Utf8ErrorReason:()=>X.Uw,_TypedDataEncoder:()=>Re.E,_fetchData:()=>Q._fetchData,_toEscapedUtf8String:()=>X.U$,accessListify:()=>m.accessListify,arrayify:()=>h.arrayify,base58:()=>G.Base58,base64:()=>ir,checkProperties:()=>p.checkProperties,checkResultErrors:()=>s.BR,commify:()=>gr.commify,computeAddress:()=>m.computeAddress,computeHmac:()=>J.Gy,computePublicKey:()=>hr.computePublicKey,concat:()=>h.concat,deepCopy:()=>p.deepCopy,defaultAbiCoder:()=>rr.$,defaultPath:()=>sr.defaultPath,defineReadOnly:()=>p.defineReadOnly,dnsEncode:()=>Y.Kn,entropyToMnemonic:()=>sr.entropyToMnemonic,fetchJson:()=>Q.fetchJson,formatBytes32String:()=>mr.s,formatEther:()=>gr.formatEther,formatUnits:()=>gr.formatUnits,getAccountPath:()=>sr.getAccountPath,getAddress:()=>d.getAddress,getContractAddress:()=>d.getContractAddress,getCreate2Address:()=>d.getCreate2Address,getIcapAddress:()=>d.getIcapAddress,getJsonWalletAddress:()=>cr.Rb,getStatic:()=>p.getStatic,hashMessage:()=>or.r,hexConcat:()=>h.hexConcat,hexDataLength:()=>h.hexDataLength,hexDataSlice:()=>h.hexDataSlice,hexStripZeros:()=>h.hexStripZeros,hexValue:()=>h.hexValue,hexZeroPad:()=>h.hexZeroPad,hexlify:()=>h.hexlify,id:()=>ar.id,isAddress:()=>d.isAddress,isBytes:()=>h.isBytes,isBytesLike:()=>h.isBytesLike,isHexString:()=>h.isHexString,isValidMnemonic:()=>sr.isValidMnemonic,isValidName:()=>Y.r1,joinSignature:()=>h.joinSignature,keccak256:()=>lr.keccak256,mnemonicToEntropy:()=>sr.mnemonicToEntropy,mnemonicToSeed:()=>sr.mnemonicToSeed,namehash:()=>Y.VM,nameprep:()=>pr.Ll,parseBytes32String:()=>mr.F,parseEther:()=>gr.parseEther,parseTransaction:()=>m.parse,parseUnits:()=>gr.parseUnits,poll:()=>Q.poll,randomBytes:()=>dr.O,recoverAddress:()=>m.recoverAddress,recoverPublicKey:()=>hr.recoverPublicKey,resolveProperties:()=>p.resolveProperties,ripemd160:()=>J.bP,serializeTransaction:()=>m.serialize,sha256:()=>J.JQ,sha512:()=>J.o,shallowCopy:()=>p.shallowCopy,shuffled:()=>xt.y,solidityKeccak256:()=>ur.keccak256,solidityPack:()=>ur.pack,soliditySha256:()=>ur.sha256,splitSignature:()=>h.splitSignature,stripZeros:()=>h.stripZeros,toUtf8Bytes:()=>X.Y0,toUtf8CodePoints:()=>X.XL,toUtf8String:()=>X.ZN,verifyMessage:()=>B.verifyMessage,verifyTypedData:()=>B.verifyTypedData,zeroPad:()=>h.zeroPad});var a={};r.r(a),r.d(a,{BaseContract:()=>P,BigNumber:()=>f.O$,Contract:()=>O,ContractFactory:()=>R,FixedNumber:()=>N.xs,Signer:()=>u.E,VoidSigner:()=>u.b,Wallet:()=>B.Wallet,Wordlist:()=>tr.D,constants:()=>n,errors:()=>g.ErrorCode,getDefaultProvider:()=>Qt,logger:()=>br,providers:()=>i,utils:()=>o,version:()=>yr,wordlists:()=>er.E});var s=r(8767),c=r(28081),l=r(43169),u=r(47818),d=r(87243),f=r(24326),h=r(74905),p=r(37025),m=r(62063),g=r(83820);var v=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const y=new g.Logger("contracts/5.7.0"),b={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function w(e,t){return v(this,void 0,void 0,(function*(){const r=yield t;"string"!==typeof r&&y.throwArgumentError("invalid address or ENS name","name",r);try{return(0,d.getAddress)(r)}catch(i){}e||y.throwError("a provider or signer is needed to resolve ENS names",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield e.resolveName(r);return null==n&&y.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function x(e,t,r){return v(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>x(e,Array.isArray(t)?t[n]:t[r.name],r)))):"address"===r.type?yield w(e,t):"tuple"===r.type?yield x(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>x(e,t,r.arrayChildren)))):Promise.reject(y.makeError("invalid value for array",g.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function _(e,t,r){return v(this,void 0,void 0,(function*(){let n={};r.length===t.inputs.length+1&&"object"===typeof r[r.length-1]&&(n=(0,p.shallowCopy)(r.pop())),y.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=(0,p.resolveProperties)({override:w(e.signer,n.from),signer:e.signer.getAddress()}).then((e=>v(this,void 0,void 0,(function*(){return(0,d.getAddress)(e.signer)!==e.override&&y.throwError("Contract with a Signer cannot override from",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):n.from=e.signer.getAddress():n.from&&(n.from=w(e.provider,n.from));const i=yield(0,p.resolveProperties)({args:x(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,p.resolveProperties)(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),a={data:o,to:i.address},s=i.overrides;if(null!=s.nonce&&(a.nonce=f.O$.from(s.nonce).toNumber()),null!=s.gasLimit&&(a.gasLimit=f.O$.from(s.gasLimit)),null!=s.gasPrice&&(a.gasPrice=f.O$.from(s.gasPrice)),null!=s.maxFeePerGas&&(a.maxFeePerGas=f.O$.from(s.maxFeePerGas)),null!=s.maxPriorityFeePerGas&&(a.maxPriorityFeePerGas=f.O$.from(s.maxPriorityFeePerGas)),null!=s.from&&(a.from=s.from),null!=s.type&&(a.type=s.type),null!=s.accessList&&(a.accessList=(0,m.accessListify)(s.accessList)),null==a.gasLimit&&null!=t.gas){let e=21e3;const r=(0,h.arrayify)(o);for(let t=0;tnull!=n[e]));return c.length&&y.throwError(`cannot override ${c.map((e=>JSON.stringify(e))).join(",")}`,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:c}),a}))}function E(e,t){const r=t.wait.bind(t);t.wait=t=>r(t).then((t=>(t.events=t.logs.map((r=>{let n=(0,p.deepCopy)(r),i=null;try{i=e.interface.parseLog(r)}catch(o){}return i&&(n.args=i.args,n.decode=(t,r)=>e.interface.decodeEventLog(i.eventFragment,t,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n})),t)))}function k(e,t,r){const n=e.signer||e.provider;return function(){for(var i=arguments.length,o=new Array(i),a=0;aArray.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class M{constructor(e,t){(0,p.defineReadOnly)(this,"tag",e),(0,p.defineReadOnly)(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter((r=>!(!t&&r.listener===e)||(t=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((e=>e.listener))}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter((t=>{const r=e.slice();return setTimeout((()=>{t.listener.apply(this,r)}),0),!t.once})),t}prepareEvent(e){}getEmit(e){return[e]}}class C extends M{constructor(){super("error",null)}}class I extends M{constructor(e,t,r,n){const i={address:e};let o=t.getEventTopic(r);n?(o!==n[0]&&y.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(A(i),i),(0,p.defineReadOnly)(this,"address",e),(0,p.defineReadOnly)(this,"interface",t),(0,p.defineReadOnly)(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=(0,s.BR)(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class T extends M{constructor(e,t){super("*",{address:e}),(0,p.defineReadOnly)(this,"address",e),(0,p.defineReadOnly)(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,r)=>this.interface.decodeEventLog(t.eventFragment,e,r),e.args=t.args}catch(t){}}}class P{constructor(e,t,r){var n=this;(0,p.defineReadOnly)(this,"interface",(0,p.getStatic)(new.target,"getInterface")(t)),null==r?((0,p.defineReadOnly)(this,"provider",null),(0,p.defineReadOnly)(this,"signer",null)):u.E.isSigner(r)?((0,p.defineReadOnly)(this,"provider",r.provider||null),(0,p.defineReadOnly)(this,"signer",r)):l.zt.isProvider(r)?((0,p.defineReadOnly)(this,"provider",r),(0,p.defineReadOnly)(this,"signer",null)):y.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,p.defineReadOnly)(this,"callStatic",{}),(0,p.defineReadOnly)(this,"estimateGas",{}),(0,p.defineReadOnly)(this,"functions",{}),(0,p.defineReadOnly)(this,"populateTransaction",{}),(0,p.defineReadOnly)(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const r=this.interface.events[t];(0,p.defineReadOnly)(this.filters,t,(function(){for(var e=arguments.length,t=new Array(e),i=0;i{const r=e[t];1===r.length?(0,p.defineReadOnly)(this.filters,t,this.filters[r[0]]):y.warn(`Duplicate definition of ${t} (${r.join(", ")})`)}))}if((0,p.defineReadOnly)(this,"_runningEvents",{}),(0,p.defineReadOnly)(this,"_wrappedEmits",{}),null==e&&y.throwArgumentError("invalid contract address or ENS name","addressOrName",e),(0,p.defineReadOnly)(this,"address",e),this.provider)(0,p.defineReadOnly)(this,"resolvedAddress",w(this.provider,e));else try{(0,p.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,d.getAddress)(e)))}catch(a){y.throwError("provider is required to use ENS name as contract address",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const i={},o={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(o[e])y.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{o[e]=!0;{const r=t.name;i[`%${r}`]||(i[`%${r}`]=[]),i[`%${r}`].push(e)}null==this[e]&&(0,p.defineReadOnly)(this,e,S(this,t,!0)),null==this.functions[e]&&(0,p.defineReadOnly)(this.functions,e,S(this,t,!1)),null==this.callStatic[e]&&(0,p.defineReadOnly)(this.callStatic,e,k(this,t,!0)),null==this.populateTransaction[e]&&(0,p.defineReadOnly)(this.populateTransaction,e,function(e,t){return function(){for(var r=arguments.length,n=new Array(r),i=0;i{const t=i[e];if(t.length>1)return;e=e.substring(1);const r=t[0];try{null==this[e]&&(0,p.defineReadOnly)(this,e,this[r])}catch(n){}null==this.functions[e]&&(0,p.defineReadOnly)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&(0,p.defineReadOnly)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&(0,p.defineReadOnly)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&(0,p.defineReadOnly)(this.estimateGas,e,this.estimateGas[r])}))}static getContractAddress(e){return(0,d.getContractAddress)(e)}static getInterface(e){return c.vU.isInterface(e)?e:new c.vU(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,e).then((e=>("0x"===e&&y.throwError("contract not deployed",g.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||y.throwError("sending a transactions require a signer",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=(0,p.shallowCopy)(e||{});return["from","to"].forEach((function(e){null!=t[e]&&y.throwError("cannot override "+e,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"===typeof e&&(e=new u.b(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,p.defineReadOnly)(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return c.Hk.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new C);if("event"===e)return this._normalizeRunningEvent(new M("event",null));if("*"===e)return this._normalizeRunningEvent(new T(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new I(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!==typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new I(this.address,this.interface,r,e.topics))}catch(t){}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new M(A(r),r))}return this._normalizeRunningEvent(new T(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const n=(0,p.deepCopy)(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n}_addEventListener(e,t,r){if(this.provider||y.throwError("events require a provider or a signer with a provider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t)}catch(i){n.decodeError=i.error}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}queryFilter(e,t,r){const n=this._getRunningEvent(e),i=(0,p.shallowCopy)(n.filter);return"string"===typeof t&&(0,h.isHexString)(t,32)?(null!=r&&y.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((e=>e.map((e=>this._wrapEvent(n,e,null)))))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e){if(!this.provider)return!1;const t=this._getRunningEvent(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i0;return this._checkRunningEvents(t),o}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce(((e,t)=>e+this._runningEvents[t].listenerCount()),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach((t=>{e.push(t)}));return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class O extends P{}class R{constructor(e,t,r){let n=null;n="string"===typeof t?t:(0,h.isBytes)(t)?(0,h.hexlify)(t):t&&"string"===typeof t.object?t.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!(0,h.isHexString)(n)||n.length%2)&&y.throwArgumentError("invalid bytecode","bytecode",t),r&&!u.E.isSigner(r)&&y.throwArgumentError("invalid signer","signer",r),(0,p.defineReadOnly)(this,"bytecode",n),(0,p.defineReadOnly)(this,"interface",(0,p.getStatic)(new.target,"getInterface")(e)),(0,p.defineReadOnly)(this,"signer",r||null)}getDeployTransaction(){let e={};for(var t=arguments.length,r=new Array(t),n=0;n{null!=e[t]&&y.throwError("cannot override "+t,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.value){f.O$.from(e.value).isZero()||this.interface.deploy.payable||y.throwError("non-payable constructor cannot override value",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:e.value})}return y.checkArgumentCount(r.length,this.interface.deploy.inputs.length," in Contract constructor"),e.data=(0,h.hexlify)((0,h.concat)([this.bytecode,this.interface.encodeDeploy(r)])),e}deploy(){for(var e=arguments.length,t=new Array(e),r=0;rthis.data(e,!0))),type:ie.allowNull(s),accessList:ie.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:s,blockNumber:s,transactionHash:o,address:t,topics:ie.arrayOf(o),data:i,logIndex:s,blockHash:o},e.receipt={to:ie.allowNull(this.address,null),from:ie.allowNull(this.address,null),contractAddress:ie.allowNull(t,null),transactionIndex:s,root:ie.allowNull(a),gasUsed:r,logsBloom:ie.allowNull(i),blockHash:o,transactionHash:o,logs:ie.arrayOf(this.receiptLog.bind(this)),blockNumber:s,confirmations:ie.allowNull(s,null),cumulativeGasUsed:r,effectiveGasPrice:ie.allowNull(r),status:ie.allowNull(s),type:c},e.block={hash:ie.allowNull(o),parentHash:o,number:s,timestamp:s,nonce:ie.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:ie.allowNull(t),extraData:i,transactions:ie.allowNull(ie.arrayOf(o)),baseFeePerGas:ie.allowNull(r)},e.blockWithTransactions=(0,p.shallowCopy)(e.block),e.blockWithTransactions.transactions=ie.allowNull(ie.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ie.allowNull(n,void 0),toBlock:ie.allowNull(n,void 0),blockHash:ie.allowNull(o,void 0),address:ie.allowNull(t,void 0),topics:ie.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ie.allowNull(s),blockHash:ie.allowNull(o),transactionIndex:s,removed:ie.allowNull(this.boolean.bind(this)),address:t,data:ie.allowFalsish(i,"0x"),topics:ie.arrayOf(o),transactionHash:o,logIndex:s},e}accessList(e){return(0,m.accessListify)(e||[])}number(e){return"0x"===e?0:f.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:f.O$.from(e).toNumber()}bigNumber(e){return f.O$.from(e)}boolean(e){if("boolean"===typeof e)return e;if("string"===typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,h.isHexString)(e))?e.toLowerCase():ne.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return(0,d.getAddress)(e)}callAddress(e){if(!(0,h.isHexString)(e,32))return null;const t=(0,d.getAddress)((0,h.hexDataSlice)(e,12));return t===L?null:t}contractAddress(e){return(0,d.getContractAddress)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"===typeof e||(0,h.isHexString)(e))return(0,h.hexValue)(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==(0,h.hexDataLength)(r)?ne.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=f.O$.from(e);try{return t.toNumber()}catch(r){}return null}uint256(e){if(!(0,h.isHexString)(e))throw new Error("invalid uint256");return(0,h.hexZeroPad)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=ie.check(t,e);return n._difficulty=null==r?null:f.O$.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ie.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&f.O$.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=ie.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,h.isHexString)(r)&&(r=f.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,h.isHexString)(r)&&(r=f.O$.from(r).toNumber()),"number"!==typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!==typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return(0,m.parse)(e)}receiptLog(e){return ie.check(this.formats.receiptLog,e)}receipt(e){const t=ie.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=f.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&ne.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):ne.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&ne.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return ie.check(this.formats.filter,e)}filterLog(e){return ie.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const i in e)try{const n=e[i](t[i]);void 0!==n&&(r[i]=n)}catch(n){throw n.checkKey=i,n.checkValue=t[i],n}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}function oe(e){return e&&"function"===typeof e.isCommunityResource}function ae(e){return oe(e)&&e.isCommunityResource()}let se=!1;function ce(){se||(se=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var le=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const ue=new g.Logger(re);function de(e){return null==e?"null":(32!==(0,h.hexDataLength)(e)&&ue.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function fe(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[de(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return de(e)})).join("&")}function he(e){if("string"===typeof e){if(e=e.toLowerCase(),32===(0,h.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+fe(e);if(l.Sg.isForkEvent(e))throw ue.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+fe(e.topics||[])}throw new Error("invalid event - "+e)}function pe(){return(new Date).getTime()}function me(e){return new Promise((t=>{setTimeout(t,e)}))}const ge=["block","network","pending","poll"];class ve{constructor(e,t,r){(0,p.defineReadOnly)(this,"tag",e),(0,p.defineReadOnly)(this,"listener",t),(0,p.defineReadOnly)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||ge.indexOf(this.tag)>=0}}const ye={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function be(e){return(0,h.hexZeroPad)(f.O$.from(e).toHexString(),32)}function we(e){return G.Base58.encode((0,h.concat)([e,(0,h.hexDataSlice)((0,J.JQ)((0,J.JQ)(e)),0,4)]))}const xe=new RegExp("^(ipfs)://(.*)$","i"),_e=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),xe,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ee(e,t){try{return(0,X.ZN)(ke(e,t))}catch(r){}return null}function ke(e,t){if("0x"===e)return null;const r=f.O$.from((0,h.hexDataSlice)(e,t,t+32)).toNumber(),n=f.O$.from((0,h.hexDataSlice)(e,r,r+32)).toNumber();return(0,h.hexDataSlice)(e,r+32,r+32+n)}function Se(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):ue.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function Ae(e){const t=(0,h.arrayify)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function Me(e){if(e.length%32===0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Ce(e){const t=[];let r=0;for(let n=0;nf.O$.from(e).eq(1))).catch((e=>{if(e.code===g.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return le(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,h.hexConcat)([e,(0,Y.VM)(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,h.hexConcat)(["0x9061b923",Ce([(0,Y.Kn)(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,h.arrayify)(e).length%32===4&&ue.throwError("resolver threw error",g.Logger.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=ke(e,0)),e}catch(i){if(i.code===g.Logger.errors.CALL_EXCEPTION)return null;throw i}}))}_fetchBytes(e,t){return le(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?ke(r,0):null}))}_getAddress(e,t){const r=ye[String(e)];if(null==r&&ue.throwError(`unsupported coin type: ${e}`,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=(0,h.arrayify)(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return we((0,h.concat)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return we((0,h.concat)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=te().toWords(n.slice(2));return e.unshift(t),te().encode(r.prefix,e)}}return null}getAddress(e){return le(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===D.R?null:this.provider.formatter.callAddress(e)}catch(n){if(n.code===g.Logger.errors.CALL_EXCEPTION)return null;throw n}const t=yield this._fetchBytes("0xf1cb7e06",be(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&ue.throwError("invalid or unsupported coin data",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return le(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<_e.length;r++){const n=t.match(_e[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:Se(t)};case"erc721":case"erc1155":{const r="erc721"===i?"0xc87b56dd":"0x0e89341c";e.push({type:i,content:t});const o=this._resolvedAddress||(yield this.getAddress()),a=(n[2]||"").split("/");if(2!==a.length)return null;const s=yield this.provider.formatter.address(a[0]),c=(0,h.hexZeroPad)(f.O$.from(a[1]).toHexString(),32);if("erc721"===i){const t=this.provider.formatter.callAddress(yield this.provider.call({to:s,data:(0,h.hexConcat)(["0x6352211e",c])}));if(o!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===i){const t=f.O$.from(yield this.provider.call({to:s,data:(0,h.hexConcat)(["0x00fdd58e",(0,h.hexZeroPad)(o,32),c])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const l={to:this.provider.formatter.address(a[0]),data:(0,h.hexConcat)([r,c])};let u=Ee(yield this.provider.call(l),0);if(null==u)return null;e.push({type:"metadata-url-base",content:u}),"erc1155"===i&&(u=u.replace("{id}",c.substring(2)),e.push({type:"metadata-url-expanded",content:u})),u.match(/^ipfs:/i)&&(u=Se(u)),e.push({type:"metadata-url",content:u});const d=yield(0,Q.fetchJson)(u);if(!d)return null;e.push({type:"metadata",content:JSON.stringify(d)});let p=d.image;if("string"!==typeof p)return null;if(p.match(/^(https:\/\/|data:)/i));else{if(null==p.match(xe))return null;e.push({type:"url-ipfs",content:p}),p=Se(p)}return e.push({type:"url",content:p}),{linkage:e,url:p}}}}}catch(t){}return null}))}getContentHash(){return le(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+G.Base58.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+G.Base58.encode("0x"+r[1])}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const i=e.match(/^0x90b2c605([0-9a-f]*)$/);if(i&&68===i[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+(0,K.c)("0x"+i[1]).replace(/[=+\/]/g,(t=>e[t]))}return ue.throwError("invalid or unsupported content hash data",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return le(this,void 0,void 0,(function*(){let t=(0,X.Y0)(e);t=(0,h.concat)([be(64),be(t.length),t]),t.length%32!==0&&(t=(0,h.concat)([t,(0,h.hexZeroPad)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,h.hexlify)(t));return null==r||"0x"===r?null:(0,X.ZN)(r)}))}}let Te=null,Pe=1;class Oe extends l.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,p.defineReadOnly)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=(0,p.getStatic)(new.target,"getNetwork")(e);t?((0,p.defineReadOnly)(this,"_network",t),this.emit("network",t,null)):ue.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return le(this,void 0,void 0,(function*(){if(null==this._network){let t=null;if(this._networkPromise)try{t=yield this._networkPromise}catch(e){}null==t&&(t=yield this.detectNetwork()),t||ue.throwError("no network detected",g.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:(0,p.defineReadOnly)(this,"_network",t),this.emit("network",t,null))}return this._network}))}get ready(){return(0,Q.poll)((()=>this._ready().then((e=>e),(e=>{if(e.code!==g.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==Te&&(Te=new ie),Te}static getNetwork(e){return $(null==e?"homestead":e)}ccipReadFetch(e,t,r){return le(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e=0?null:JSON.stringify({data:i,sender:n}),c=yield(0,Q.fetchJson)({url:a,errorPassThrough:!0},s,((e,t)=>(e.status=t.statusCode,e)));if(c.data)return c.data;const l=c.message||"unknown error";if(c.status>=400&&c.status<500)return ue.throwError(`response not found during CCIP fetch: ${l}`,g.Logger.errors.SERVER_ERROR,{url:t,errorMessage:l});o.push(l)}return ue.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,g.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return le(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(pe()-r.respTime<=e)return r.blockNumber;break}catch(n){if(this._internalBlockNumber===t)break}}const t=pe(),r=(0,p.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((e=>{let{blockNumber:n,networkError:i}=e;if(i)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),i;const o=pe();return n=f.O$.from(n).toNumber(),n{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return le(this,void 0,void 0,(function*(){const e=Pe++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(n){return void this.emit("error",n)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)ue.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",ue.makeError("network block skew detected",g.Logger.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return le(this,void 0,void 0,(function*(){return ue.throwError("provider does not support network detection",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return le(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield me(0),this._network;const r=ue.makeError("underlying network changed",g.Logger.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=pe();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return le(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return le(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const a=[];let s=!1;const c=function(){return!!s||(s=!0,a.forEach((e=>{e()})),!1)},l=e=>{e.confirmations{this.removeListener(e,l)})),n){let r=n.startBlock,i=null;const l=a=>le(this,void 0,void 0,(function*(){s||(yield me(1e3),this.getTransactionCount(n.from).then((u=>le(this,void 0,void 0,(function*(){if(!s){if(u<=n.nonce)r=a;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i{s||this.once("block",l)})))}));if(s)return;this.once("block",l),a.push((()=>{this.removeListener("block",l)}))}if("number"===typeof r&&r>0){const e=setTimeout((()=>{c()||o(ue.makeError("timeout exceeded",g.Logger.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),a.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return le(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return le(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return f.O$.from(e)}catch(t){return ue.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return le(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,p.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return f.O$.from(n)}catch(i){return ue.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:i})}}))}getTransactionCount(e,t){return le(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,p.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return f.O$.from(n).toNumber()}catch(i){return ue.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:i})}}))}getCode(e,t){return le(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,p.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,h.hexlify)(n)}catch(i){return ue.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:i})}}))}getStorageAt(e,t,r){return le(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,p.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>(0,h.hexValue)(e)))}),i=yield this.perform("getStorageAt",n);try{return(0,h.hexlify)(i)}catch(o){return ue.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:o})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,h.hexDataLength)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&ue.throwError("Transaction hash mismatch from Provider.sendTransaction.",g.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>le(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&ue.throwError("transaction failed",g.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return le(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,h.hexlify)(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(i){throw i.transaction=r,i.transactionHash=r.hash,i}}))}_getTransactionRequest(e){return le(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?f.O$.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?(0,h.hexlify)(e):null)))})),this.formatter.transactionRequest(yield(0,p.resolveProperties)(r))}))}_getFilter(e){return le(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield(0,p.resolveProperties)(t))}))}_call(e,t,r){return le(this,void 0,void 0,(function*(){r>=10&&ue.throwError("CCIP read exceeded maximum redirections",g.Logger.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,h.hexDataLength)(i)%32===4)try{const o=(0,h.hexDataSlice)(i,4),a=(0,h.hexDataSlice)(o,0,32);f.O$.from(a).eq(n)||ue.throwError("CCIP Read sender did not match",g.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const s=[],c=f.O$.from((0,h.hexDataSlice)(o,32,64)).toNumber(),l=f.O$.from((0,h.hexDataSlice)(o,c,c+32)).toNumber(),u=(0,h.hexDataSlice)(o,c+32);for(let t=0;tle(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let n=0;nthis._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return le(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,Q.poll)((()=>le(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return le(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,Q.poll)((()=>le(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return le(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,p.resolveProperties)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),ie.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return le(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return le(this,void 0,void 0,(function*(){if("number"===typeof(e=yield e)&&e<0){e%1&&ue.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return le(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new Ie(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return le(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||ue.throwError("network does not support ENS",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,Y.VM)(e).substring(2)});return this.formatter.callAddress(t)}catch(n){}return null}))}resolveName(e){return le(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(r){if((0,h.isHexString)(e))throw r}"string"!==typeof e&&ue.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return le(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=Ee(yield this.call({to:r,data:"0x691f3431"+(0,Y.VM)(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return le(this,void 0,void 0,(function*(){let t=null;if((0,h.isHexString)(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(r,"getAvatar");if(!i)return null;t=new Ie(this,i,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(n){if(n.code!==g.Logger.errors.CALL_EXCEPTION)throw n}try{const e=Ee(yield this.call({to:i,data:"0x691f3431"+(0,Y.VM)(r).substring(2)}),0);t=yield this.getResolver(e)}catch(n){if(n.code!==g.Logger.errors.CALL_EXCEPTION)throw n;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return ue.throwError(e+" not implemented",g.Logger.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new ve(he(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne.tag!==a||(setTimeout((()=>{e.listener.apply(this,r)}),0),i=!0,!e.once||(o.push(e),!1)))),o.forEach((e=>{this._stopEvent(e)})),i}listenerCount(e){if(!e)return this._events.length;let t=he(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=he(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=he(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=he(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var Re=r(71341),Ne=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const Be=new g.Logger(re),Le=["call","estimateGas"];function je(e,t){if(null==e)return null;if("string"===typeof e.message&&e.message.match("reverted")){const r=(0,h.isHexString)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"===typeof e){for(const r in e){const n=je(e[r],t);if(n)return n}return null}if("string"===typeof e)try{return je(JSON.parse(e),t)}catch(r){}return null}function De(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=je(t,!0);if(e)return e.data;Be.throwError("missing revert data in call exception; Transaction reverted without a reason string",g.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=je(t.body,!1);null==r&&(r=je(t,!1)),r&&Be.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===g.Logger.errors.SERVER_ERROR&&t.error&&"string"===typeof t.error.message?i=t.error.message:"string"===typeof t.body?i=t.body:"string"===typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Be.throwError("insufficient funds for intrinsic transaction cost",g.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&Be.throwError("nonce has already been used",g.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Be.throwError("replacement fee too low",g.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&Be.throwError("legacy pre-eip-155 transactions not supported",g.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),Le.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Be.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function Fe(e){return new Promise((function(t){setTimeout(t,e)}))}function Ue(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function ze(e){return e?e.toLowerCase():e}const Ze={};class qe extends u.E{constructor(e,t,r){if(super(),e!==Ze)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,p.defineReadOnly)(this,"provider",t),null==r&&(r=0),"string"===typeof r?((0,p.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,p.defineReadOnly)(this,"_index",null)):"number"===typeof r?((0,p.defineReadOnly)(this,"_index",r),(0,p.defineReadOnly)(this,"_address",null)):Be.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return Be.throwError("cannot alter JSON-RPC Signer connection",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new He(Ze,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&Be.throwError("unknown account #"+this._index,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=(0,p.shallowCopy)(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=(0,p.shallowCopy)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>Ne(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&Be.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),(0,p.resolveProperties)({tx:(0,p.resolveProperties)(e),sender:t}).then((t=>{let{tx:r,sender:n}=t;null!=r.from?r.from.toLowerCase()!==n&&Be.throwArgumentError("from address mismatch","transaction",e):r.from=n;const i=this.provider.constructor.hexlifyTransaction(r,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then((e=>e),(e=>("string"===typeof e.message&&e.message.match(/user denied/i)&&Be.throwError("user rejected transaction",g.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),De("sendTransaction",e,i))))}))}signTransaction(e){return Be.throwError("signing transactions is unsupported",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Ne(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield(0,Q.poll)((()=>Ne(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(n){throw n.transactionHash=r,n}}))}signMessage(e){return Ne(this,void 0,void 0,(function*(){const t="string"===typeof e?(0,X.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,h.hexlify)(t),r.toLowerCase()])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&Be.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),n}}))}_legacySignMessage(e){return Ne(this,void 0,void 0,(function*(){const t="string"===typeof e?(0,X.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,h.hexlify)(t)])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&Be.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),n}}))}_signTypedData(e,t,r){return Ne(this,void 0,void 0,(function*(){const n=yield Re.E.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Re.E.getPayload(n.domain,t,n.value))])}catch(o){throw"string"===typeof o.message&&o.message.match(/user denied/i)&&Be.throwError("user rejected signing",g.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),o}}))}unlock(e){return Ne(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class He extends qe{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const Ve={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class We extends Oe{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=(0,p.getStatic)(this.constructor,"defaultUrl")()),"string"===typeof e?(0,p.defineReadOnly)(this,"connection",Object.freeze({url:e})):(0,p.defineReadOnly)(this,"connection",Object.freeze((0,p.shallowCopy)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Ne(this,void 0,void 0,(function*(){yield Fe(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(t){}}if(null!=e){const r=(0,p.getStatic)(this.constructor,"getNetwork");try{return r(f.O$.from(e).toNumber())}catch(t){return Be.throwError("could not detect network",g.Logger.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return Be.throwError("could not detect network",g.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new qe(Ze,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,p.deepCopy)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=(0,Q.fetchJson)(this.connection,JSON.stringify(r),Ue).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ze(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ze(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ze(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ze(t.address),(0,h.hexZeroPad)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,p.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,p.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=ze(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return Ne(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&f.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,p.shallowCopy)(t)).transaction=(0,p.shallowCopy)(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&Be.throwError(e+" not implemented",g.Logger.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(n){return De(e,n,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return Fe(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=(0,p.shallowCopy)(Ve);if(t)for(const i in t)t[i]&&(r[i]=!0);(0,p.checkProperties)(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=(0,h.hexValue)(f.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=(0,h.hexlify)(e[t]))})),e.accessList&&(n.accessList=(0,m.accessListify)(e.accessList)),n}}let $e=null;try{if($e=WebSocket,null==$e)throw new Error("inject please")}catch(wr){const e=new g.Logger(re);$e=function(){e.throwError("WebSockets not supported in this environment",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ke=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const Ge=new g.Logger(re);let Ye=1;class Je extends We{constructor(e,t){"any"===t&&Ge.throwError("WebSocketProvider does not support 'any' network yet",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"===typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,"string"===typeof e?(0,p.defineReadOnly)(this,"_websocket",new $e(this.connection.url)):(0,p.defineReadOnly)(this,"_websocket",e),(0,p.defineReadOnly)(this,"_requests",{}),(0,p.defineReadOnly)(this,"_subs",{}),(0,p.defineReadOnly)(this,"_subIds",{}),(0,p.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,r=JSON.parse(t);if(null!=r.id){const e=String(r.id),n=this._requests[e];if(delete this._requests[e],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let e=null;r.error?(e=new Error(r.error.message||"unknown error"),(0,p.defineReadOnly)(e,"code",r.error.code||null),(0,p.defineReadOnly)(e,"response",t)):e=new Error("unknown error"),n.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Ge.throwError("cannot reset events block on WebSocketProvider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Ge.throwError("cannot set polling interval on WebSocketProvider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Ke(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&Ge.throwError("cannot set polling on WebSocketProvider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=Ye++;return new Promise(((n,i)=>{const o=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?i(e):n(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,r){return Ke(this,void 0,void 0,(function*(){let n=this._subIds[e];null==n&&(n=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=n);const i=yield n;this._subs[i]={tag:e,processFunc:r}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=f.O$.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return Ke(this,void 0,void 0,(function*(){this.websocket.readyState===$e.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}var Xe=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const Qe=new g.Logger(re);class et extends We{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Xe(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||Qe.throwError("no network detected",g.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,p.defineReadOnly)(this,"_network",t),this.emit("network",t,null))),t}))}}class tt extends et{constructor(e,t){Qe.checkAbstract(new.target,tt),e=(0,p.getStatic)(new.target,"getNetwork")(e),t=(0,p.getStatic)(new.target,"getApiKey")(t);super((0,p.getStatic)(new.target,"getUrl")(e,t),e),"string"===typeof t?(0,p.defineReadOnly)(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{(0,p.defineReadOnly)(this,e,t[e])}))}_startPending(){Qe.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return Qe.throwError("API provider does not support signing",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return Qe.throwError("not implemented; sub-classes must override getUrl",g.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const rt=new g.Logger(re),nt="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class it extends Je{constructor(e,t){const r=new ot(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,p.defineReadOnly)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===nt}}class ot extends tt{static getWebSocketProvider(e,t){return new it(e,t)}static getApiKey(e){return null==e?nt:(e&&"string"!==typeof e&&rt.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:rt.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===nt&&ce(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===nt}}const at=new g.Logger(re),st="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function ct(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return at.throwArgumentError("unsupported network","name",e)}class lt extends tt{isCommunityResource(){return this.apiKey===st}static getApiKey(e){return null==e?st:e}static getUrl(e,t){null==t&&(t=st);const r={allowGzip:!0,url:"https://"+ct(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===st&&ce(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}var ut=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const dt=new g.Logger(re);class ft extends tt{static getApiKey(e){return null!=e&&dt.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;if("homestead"===e.name)r="https://cloudflare-eth.com/";else dt.throwArgumentError("unsupported network","network",arguments[0]);return r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return ut(this,void 0,void 0,(function*(){if("getBlockNumber"===e){return(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number}return r.perform.call(this,e,t)}))}}var ht=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const pt=new g.Logger(re);function mt(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?(0,h.hexValue)((0,h.hexlify)(n)):"accessList"===r?"["+(0,m.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":(0,h.hexlify)(n),t[r]=n)}return t}function gt(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!==typeof e.message||!e.message.match(/^OK/)){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function vt(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function yt(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function bt(e,t,r){if("call"===e&&t.code===g.Logger.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),(0,h.isHexString)(r))return r;pt.throwError("missing revert data in call exception",g.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===g.Logger.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?n=t.error.message:"string"===typeof t.body?n=t.body:"string"===typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&pt.throwError("insufficient funds for intrinsic transaction cost",g.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&pt.throwError("nonce has already been used",g.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&pt.throwError("replacement fee too low",g.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&pt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",g.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class wt extends Oe{constructor(e,t){super(e),(0,p.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,p.defineReadOnly)(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return pt.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return ht(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null,o="proxy"===e?vt:gt;this.emit("debug",{action:"request",request:n,provider:this});const a={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&ce(),Promise.resolve(!0))};let s=null;i&&(a.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},s=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const c=yield(0,Q.fetchJson)(a,s,o||vt);return this.emit("debug",{action:"response",request:n,response:(0,p.deepCopy)(c),provider:this}),c}))}detectNetwork(){return ht(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return ht(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>bt("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=mt(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(wr){return bt("call",wr,t.transaction)}}case"estimateGas":{const e=mt(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(wr){return bt("estimateGas",wr,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=yt(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=yt(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&pt.throwError("unsupported topic count",g.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"===typeof r&&66===r.length||pt.throwError("unsupported topic format",g.Logger.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let t=0;t{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}var xt=r(96842),_t=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};const Et=new g.Logger(re);function kt(){return(new Date).getTime()}function St(e){let t=null;for(let r=0;rt?null:(n+i)/2}function Mt(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(f.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>Mt(e))));if("object"===typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let r=e[t];return r="function"===typeof r?"[function]":Mt(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Ct=1;function It(e){let t=null,r=null,n=new Promise((n=>{t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:e=>(n=n.then(e),n)}}const Tt=[g.Logger.errors.CALL_EXCEPTION,g.Logger.errors.INSUFFICIENT_FUNDS,g.Logger.errors.NONCE_EXPIRED,g.Logger.errors.REPLACEMENT_UNDERPRICED,g.Logger.errors.UNPREDICTABLE_GAS_LIMIT],Pt=["address","args","errorArgs","errorSignature","method","transaction"];function Ot(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>e.provider}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function Rt(e,t,r){let n=Mt;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=At(t.map((e=>e.result)),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return At(e.map((e=>e.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=(0,p.shallowCopy)(e)).confirmations=-1,Mt(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=(0,p.shallowCopy)(e)).transactions=e.transactions.map((e=>((e=(0,p.shallowCopy)(e)).confirmations=-1,e))),Mt(e))}:function(e){return null==e?null:Mt(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){const n={};r.forEach((t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));const i=Object.keys(n);for(let e=0;e=t)return r.result}}}(n,e.quorum)}function Nt(e,t){return _t(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:(0,Q.poll)((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function Bt(e,t,r,n){return _t(this,void 0,void 0,(function*(){let i=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&(0,h.isHexString)(n.blockTag)&&(i=yield Nt(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,h.isHexString)(n.blockTag)&&(i=yield Nt(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,h.isHexString)(n.blockTag)&&(i=yield Nt(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&(0,h.isHexString)(n.blockTag)&&(i=yield Nt(e,t)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&(0,h.isHexString)(r.fromBlock)||r.toBlock&&(0,h.isHexString)(r.toBlock))&&(i=yield Nt(e,t)),i.getLogs(r)}}return Et.throwError("unknown method error",g.Logger.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class Lt extends Oe{constructor(e,t){0===e.length&&Et.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(l.zt.isProvider(e)){const t=ae(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=(0,p.shallowCopy)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=ae(e)?2e3:750),null==r.weight&&(r.weight=1);const n=r.weight;return(n%1||n>512||n<1)&&Et.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,n),Object.freeze(r)})),n=r.reduce(((e,t)=>e+t.weight),0);null==t?t=n/2:t>n&&Et.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let i=St(r.map((e=>e.provider.network)));null==i&&(i=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(i),(0,p.defineReadOnly)(this,"providerConfigs",Object.freeze(r)),(0,p.defineReadOnly)(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return _t(this,void 0,void 0,(function*(){return St(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return _t(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;te.priority-t.priority));const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const s=kt();let c=n.filter((e=>e.runner&&s-e.starte+t.weight),0);for(;c{r.staller=null})),r.runner=Bt(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:Ot(r,kt()),request:{method:e,params:(0,p.deepCopy)(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:Ot(r,kt()),request:{method:e,params:(0,p.deepCopy)(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:Ot(r,null),request:{method:e,params:(0,p.deepCopy)(t)},provider:this}),c+=r.weight}const l=[];n.forEach((e=>{!e.done&&e.runner&&(l.push(e.runner),e.staller&&l.push(e.staller.getPromise()))})),l.length&&(yield Promise.race(l));const u=n.filter((e=>e.done&&null==e.error));if(u.length>=this.quorum){const e=r(u);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;a||(yield It(100).getPromise()),a=!1}const d=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return Tt.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{});if(Object.keys(d).forEach((e=>{const t=d[e];if(t.weight{e.staller&&e.staller.cancel(),e.cancelled=!0}));const r=t.error,i={};Pt.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),Et.throwError(r.reason||r.message,e,i)})),0===n.filter((e=>!e.done)).length)break}return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),Et.throwError("failed to meet quorum",g.Logger.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>Ot(e))),provider:this})}))}}const jt=null,Dt=new g.Logger(re),Ft="84842078b09946638c03157f83405213";class Ut extends Je{constructor(e,t){const r=new zt(e,t),n=r.connection;n.password&&Dt.throwError("INFURA WebSocket project secrets unsupported",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),(0,p.defineReadOnly)(this,"apiKey",r.projectId),(0,p.defineReadOnly)(this,"projectId",r.projectId),(0,p.defineReadOnly)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===Ft}}class zt extends tt{static getWebSocketProvider(e,t){return new Ut(e,t)}static getApiKey(e){const t={apiKey:Ft,projectId:Ft,projectSecret:null};return null==e||("string"===typeof e?t.projectId=e:null!=e.projectSecret?(Dt.assertArgument("string"===typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),Dt.assertArgument("string"===typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:Dt.throwError("unsupported network",g.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===Ft&&ce(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===Ft}}class Zt extends We{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((e,t)=>{n.resolve=e,n.reject=t}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:(0,p.deepCopy)(t),provider:this}),(0,Q.fetchJson)(this.connection,JSON.stringify(t)).then((r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach(((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t)}else e.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach((e=>{e.reject(r)}))}))}),10)),i}}const qt=new g.Logger(re);class Ht extends tt{static getApiKey(e){return e&&"string"!==typeof e&&qt.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){qt.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:qt.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const Vt=new g.Logger(re),Wt="62e1ad51b37b8e00394bda3b";class $t extends tt{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=Wt:"string"===typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Vt.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:Vt.throwError("unsupported network",g.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={headers:{},url:`https://${r}/v1/lb/${t.applicationId}`};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===Wt}}const Kt=new g.Logger(re);let Gt=1;function Yt(e,t){const r="Web3LegacyFetcher";return function(e,n){const i={method:e,params:n,id:Gt++,jsonrpc:"2.0"};return new Promise(((e,n)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,p.deepCopy)(i),provider:this}),t(i,((t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:i,provider:this}),n(t);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e)}e(o.result)}))}))}}class Jt extends We{constructor(e,t){null==e&&Kt.throwArgumentError("missing provider","provider",e);let r=null,n=null,i=null;"function"===typeof e?(r="unknown:",n=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),i=e,e.request?(""===r&&(r="eip-1193:"),n=function(e){return function(t,r){null==r&&(r=[]);const n={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,p.deepCopy)(n),provider:this}),e.request(n).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e}))}}(e)):e.sendAsync?n=Yt(0,e.sendAsync.bind(e)):e.send?n=Yt(0,e.send.bind(e)):Kt.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,p.defineReadOnly)(this,"jsonRpcFetchFunc",n),(0,p.defineReadOnly)(this,"provider",i)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}const Xt=new g.Logger(re);function Qt(e,t){if(null==e&&(e="homestead"),"string"===typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new We(e);case"ws":case"wss":return new Je(e);default:Xt.throwArgumentError("unsupported URL scheme","network",e)}}const r=$(e);return r&&r._defaultProvider||Xt.throwError("unsupported getDefaultProvider network",g.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:Lt,AlchemyProvider:ot,AnkrProvider:lt,CloudflareProvider:ft,EtherscanProvider:wt,InfuraProvider:zt,JsonRpcProvider:We,NodesmithProvider:Ht,PocketProvider:$t,Web3Provider:Jt,IpcProvider:jt},t)}var er=r(80095),tr=r(91778),rr=r(11409),nr=r(31645),ir=r(17449),or=r(17026),ar=r(86507),sr=r(49465),cr=r(19519),lr=r(15084),ur=r(52131),dr=r(43585),fr=r(69139),hr=r(35046),pr=r(92730),mr=r(29313),gr=r(44147),vr=r(47244);const yr="ethers/5.7.2",br=new g.Logger(yr);try{const e=window;null==e._ethers&&(e._ethers=a)}catch(wr){}},48124:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var a=r(53689);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return a.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return a.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return a.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return a.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return a.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return a.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return a.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return a.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return a.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return a.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return a.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return a.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return a.TransactionDescription}});var s=r(87243);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return s.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return s.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return s.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return s.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return s.isAddress}});var c=o(r(17449));t.base64=c;var l=r(75200);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return l.Base58}});var u=r(74905);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return u.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return u.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return u.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return u.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return u.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return u.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return u.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return u.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return u.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return u.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return u.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return u.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return u.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return u.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return u.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return u.stripZeros}});var d=r(4893);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return d._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return d.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return d.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return d.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return d.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return d.namehash}});var f=r(49465);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return f.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return f.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return f.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return f.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return f.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return f.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return f.mnemonicToSeed}});var h=r(906);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return h.getJsonWalletAddress}});var p=r(15084);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var m=r(83820);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return m.Logger}});var g=r(68208);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return g.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return g.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return g.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return g.sha512}});var v=r(52131);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return v.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return v.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return v.sha256}});var y=r(8034);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return y.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return y.shuffled}});var b=r(37025);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return b.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return b.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return b.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return b.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return b.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return b.shallowCopy}});var w=o(r(69139));t.RLP=w;var x=r(35046);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return x.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return x.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return x.SigningKey}});var _=r(30770);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return _.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return _.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return _.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return _._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return _.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return _.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return _.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return _.Utf8ErrorFuncs}});var E=r(62063);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return E.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return E.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return E.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return E.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return E.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return E.TransactionTypes}});var k=r(44147);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return k.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return k.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return k.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return k.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return k.parseUnits}});var S=r(91765);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return S.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return S.verifyTypedData}});var A=r(79545);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return A._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return A.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return A.poll}});var M=r(68208);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return M.SupportedAlgorithm}});var C=r(30770);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return C.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return C.Utf8ErrorReason}})},46902:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i{"use strict";var t,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"===typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"===typeof e.on&&m(e,"error",t,r)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"===typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,function(e){console&&console.warn&&console.warn(e)}(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"===typeof c)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},23523:(e,t,r)=>{var n=r(38608).Buffer,i=r(49137);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),c=n.alloc(o||0),l=n.alloc(0);a>0||o>0;){var u=new i;u.update(l),u.update(e),t&&u.update(t),l=u.digest();var d=0;if(a>0){var f=s.length-a;d=Math.min(a,l.length),l.copy(s,f,0,d),a-=d}if(d0){var h=c.length-o,p=Math.min(o,l.length-d);l.copy(c,h,d,d+p),o-=p}}return l.fill(0),{key:s,iv:c}}},74069:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o{"use strict";var n=r(38608).Buffer,i=r(87488).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(47110)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(i){n=i}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},99950:(e,t,r)=>{var n=t;n.utils=r(18517),n.common=r(31619),n.sha=r(99669),n.ripemd=r(58110),n.hmac=r(90836),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},31619:(e,t,r)=>{"use strict";var n=r(18517),i=r(13859);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{"use strict";var n=r(18517),i=r(13859);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(18517),i=r(31619),o=n.rotl32,a=n.sum32,s=n.sum32_3,c=n.sum32_4,l=i.BlockHash;function u(){if(!(this instanceof u))return new u;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function f(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,l),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],l=this.h[3],u=this.h[4],y=r,b=n,w=i,x=l,_=u,E=0;E<80;E++){var k=a(o(c(r,d(E,n,i,l),e[p[E]+t],f(E)),g[E]),u);r=u,u=l,l=o(i,10),i=n,n=k,k=a(o(c(y,d(79-E,b,w,x),e[m[E]+t],h(E)),v[E]),_),y=_,_=x,x=o(w,10),w=b,b=k}k=s(this.h[1],i,x),this.h[1]=s(this.h[2],l,_),this.h[2]=s(this.h[3],u,y),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=k},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},99669:(e,t,r)=>{"use strict";t.sha1=r(34426),t.sha224=r(73010),t.sha256=r(19202),t.sha384=r(93238),t.sha512=r(81911)},34426:(e,t,r)=>{"use strict";var n=r(18517),i=r(31619),o=r(69535),a=n.rotl32,s=n.sum32,c=n.sum32_5,l=o.ft_1,u=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,u),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(18517),i=r(19202);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},19202:(e,t,r)=>{"use strict";var n=r(18517),i=r(31619),o=r(69535),a=r(13859),s=n.sum32,c=n.sum32_4,l=n.sum32_5,u=o.ch32,d=o.maj32,f=o.s0_256,h=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(y,g),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(18517),i=r(81911);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},81911:(e,t,r)=>{"use strict";var n=r(18517),i=r(31619),o=r(13859),a=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,l=n.shr64_lo,u=n.sum64,d=n.sum64_hi,f=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,v=i.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function x(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function k(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function M(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function C(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^l(e,t,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,19)^s(t,e,29)^l(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(b,v),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(18517).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},18517:(e,t,r)=>{"use strict";var n=r(13859),i=r(47110);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,l=t;return c+=(l=l+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,l){var u=0,d=t;return u+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,l){return t+n+o+s+l>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},47690:(e,t,r)=>{"use strict";var n=r(99950),i=r(99475),o=r(13859);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length{"use strict";var n=r(83284),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(p){var i=h(r);i&&i!==p&&e(t,i,n)}var a=u(r);d&&(a=a.concat(d(r)));for(var s=c(t),m=c(r),g=0;g{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case l:case f:case g:case m:case c:return e;default:return t}}case i:return t}}}function _(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||x(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=x},83284:(e,t,r)=>{"use strict";e.exports=r(5358)},74574:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<>1,u=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-l;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=l}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,c,l=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,l-=8);e[r+h-p]|=128*m}},47110:e=>{"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},48763:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const i="object"===("undefined"===typeof window?"undefined":n(window))&&"object"===("undefined"===typeof document?"undefined":n(document))&&9===document.nodeType},11904:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},75502:(e,t,r)=>{var n,i=r(54501);!function(){"use strict";var o="input is invalid type",a="object"===typeof window,s=a?window:{};s.JS_SHA3_NO_WINDOW&&(a=!1);var c=!a&&"object"===typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"===typeof i&&i.versions&&i.versions.node?s=r.g:c&&(s=self);var l=!s.JS_SHA3_NO_COMMON_JS&&e.exports,u=r.amdO,d=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],m=[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],g=[224,256,384,512],v=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new B(e,t,e).update(n)[r]()}},x=function(e,t,r){return function(n,i){return new B(e,t,i).update(n)[r]()}},_=function(e,t,r){return function(t,n,i,o){return M["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return M["kmac"+e].update(t,n,i,o)[r]()}},k=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){B.call(this,e,t,r)}B.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,a=this.blocks,s=this.byteCount,c=e.length,l=this.blockCount,u=0,f=this.s;u>2]|=e[u]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(a[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=n-s,this.block=a[l],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},B.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},B.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15];a%t===0&&(j(r),o=0)}return i&&(e=r[o],s+=f[e>>4&15]+f[15&e],i>1&&(s+=f[e>>12&15]+f[e>>8&15]),i>2&&(s+=f[e>>20&15]+f[e>>16&15])),s},B.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);a>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r===0&&j(n)}return o&&(e=s<<2,t=n[a],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},L.prototype=new B,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),B.prototype.finalize.call(this)};var j=function(e){var t,r,n,i,o,a,s,c,l,u,d,f,h,p,g,v,y,b,w,x,_,E,k,S,A,M,C,I,T,P,O,R,N,B,L,j,D,F,U,z,Z,q,H,V,W,$,K,G,Y,J,X,Q,ee,te,re,ne,ie,oe,ae,se,ce,le,ue;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(f=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|l>>>31),r=o^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(u<<1|d>>>31),r=s^(d<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(f<<1|h>>>31),r=l^(h<<1|f>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],g=e[1],$=e[11]<<4|e[10]>>>28,K=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,B=e[2]<<1|e[3]>>>31,L=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,G=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,O=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,j=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,M=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,Z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~v&b,e[1]=g^~y&w,e[10]=S^~M&I,e[11]=A^~C&T,e[20]=B^~j&F,e[21]=L^~D&U,e[30]=V^~$&G,e[31]=W^~K&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=v^~b&x,e[3]=y^~w&_,e[12]=M^~I&P,e[13]=C^~T&O,e[22]=j^~F&z,e[23]=D^~U&Z,e[32]=$^~G&J,e[33]=K^~Y&X,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=b^~x&E,e[5]=w^~_&k,e[14]=I^~P&R,e[15]=T^~O&N,e[24]=F^~z&q,e[25]=U^~Z&H,e[34]=G^~J&Q,e[35]=Y^~X&ee,e[44]=oe^~se&le,e[45]=ae^~ce&ue,e[6]=x^~E&p,e[7]=_^~k&g,e[16]=P^~R&S,e[17]=O^~N&A,e[26]=z^~q&B,e[27]=Z^~H&L,e[36]=J^~Q&V,e[37]=X^~ee&W,e[46]=se^~le&te,e[47]=ce^~ue&re,e[8]=E^~p&v,e[9]=k^~g&y,e[18]=R^~S&M,e[19]=N^~A&C,e[28]=q^~B&j,e[29]=H^~L&D,e[38]=Q^~V&$,e[39]=ee^~W&K,e[48]=le^~te&ne,e[49]=ue^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(l)e.exports=M;else{for(I=0;I{"use strict";r.d(t,{EK:()=>h,HZ:()=>ye,JH:()=>d,RB:()=>K,Ue:()=>ve,_$:()=>be,xE:()=>J});var n=r(17692),i=r(48763),o=r(59900),a=r(74289),s=r(14771),c=r(71972),l={}.constructor;function u(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(u);if(e.constructor!==l)return e;var t={};for(var r in e)t[r]=u(e[r]);return t}function d(e,t,r){void 0===e&&(e="unnamed");var n=r.jss,i=u(t),o=n.plugins.onCreateRule(e,i,r);return o||(e[0],null)}var f=function(e,t){for(var r="",n=0;n<+~=|^:(),"'`\s])/g,y="undefined"!==typeof CSS&&CSS.escape,b=function(e){return y?y(e):e.replace(v,"\\$1")},w=function(){function e(e,t,r){this.type="style",this.isProcessed=!1;var n=r.sheet,i=r.Renderer;this.key=e,this.options=r,this.style=t,n?this.renderer=n.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,r){if(void 0===t)return this.style[e];var n=!!r&&r.force;if(!n&&this.style[e]===t)return this;var i=t;r&&!1===r.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!n)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var c=this.options.sheet;return c&&c.attached,this},e}(),x=function(e){function t(t,r,n){var i;i=e.call(this,t,r,n)||this;var o=n.selector,a=n.scoped,c=n.sheet,l=n.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l((0,s.Z)((0,s.Z)(i)),c),i.selectorText="."+b(i.id)),i}(0,a.Z)(t,e);var r=t.prototype;return r.applyTo=function(e){var t=this.renderer;if(t){var r=this.toJSON();for(var n in r)t.setProperty(e,n,r[n])}return this},r.toJSON=function(){var e={};for(var t in this.style){var r=this.style[t];"object"!==typeof r?e[t]=r:Array.isArray(r)&&(e[t]=h(r))}return e},r.toString=function(e){var t=this.options.sheet,r=!!t&&t.options.link?(0,n.Z)({},e,{allowEmpty:!0}):e;return g(this.selectorText,this.style,r)},(0,o.Z)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,r=this.renderable;if(r&&t)t.setSelector(r,e)||t.replaceRule(r,this)}},get:function(){return this.selectorText}}]),t}(w),_={onCreateRule:function(e,t,r){return"@"===e[0]||r.parent&&"keyframes"===r.parent.type?null:new x(e,t,r)}},E={indent:1,children:!0},k=/@([\w-]+)/,S=function(){function e(e,t,r){this.type="conditional",this.isProcessed=!1,this.key=e;var i=e.match(k);for(var o in this.at=i?i[1]:"unknown",this.query=r.name||"@"+this.at,this.options=r,this.rules=new K((0,n.Z)({},r,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n?(this.options.jss.plugins.onProcessRule(n),n):null},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.toString=function(e){void 0===e&&(e=E);var t=p(e).linebreak;if(null==e.indent&&(e.indent=E.indent),null==e.children&&(e.children=E.children),!1===e.children)return this.query+" {}";var r=this.rules.toString(e);return r?this.query+" {"+t+r+t+"}":""},e}(),A=/@container|@media|@supports\s+/,M={onCreateRule:function(e,t,r){return A.test(e)?new S(e,t,r):null}},C={indent:1,children:!0},I=/@keyframes\s+([\w-]+)/,T=function(){function e(e,t,r){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=e.match(I);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var o=r.scoped,a=r.sheet,s=r.generateId;for(var c in this.id=!1===o?this.name:b(s(this,a)),this.rules=new K((0,n.Z)({},r,{parent:this})),t)this.rules.add(c,t[c],(0,n.Z)({},r,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=C);var t=p(e).linebreak;if(null==e.indent&&(e.indent=C.indent),null==e.children&&(e.children=C.children),!1===e.children)return this.at+" "+this.id+" {}";var r=this.rules.toString(e);return r&&(r=""+t+r+t),this.at+" "+this.id+" {"+r+"}"},e}(),P=/@keyframes\s+/,O=/\$([\w-]+)/g,R=function(e,t){return"string"===typeof e?e.replace(O,(function(e,r){return r in t?t[r]:e})):e},N=function(e,t,r){var n=e[t],i=R(n,r);i!==n&&(e[t]=i)},B={onCreateRule:function(e,t,r){return"string"===typeof e&&P.test(e)?new T(e,t,r):null},onProcessStyle:function(e,t,r){return"style"===t.type&&r?("animation-name"in e&&N(e,"animation-name",r.keyframes),"animation"in e&&N(e,"animation",r.keyframes),e):e},onChangeValue:function(e,t,r){var n=r.options.sheet;if(!n)return e;switch(t){case"animation":case"animation-name":return R(e,n.keyframes);default:return e}}},L=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.Z)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,r=!!t&&t.options.link?(0,n.Z)({},e,{allowEmpty:!0}):e;return g(this.key,this.style,r)},t}(w),j={onCreateRule:function(e,t,r){return r.parent&&"keyframes"===r.parent.type?new L(e,t,r):null}},D=function(){function e(e,t,r){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){var t=p(e).linebreak;if(Array.isArray(this.style)){for(var r="",n=0;n=this.index)t.push(e);else for(var n=0;nr)return void t.splice(n,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,r=t.attached,n=(0,c.Z)(t,["attached"]),i=p(n).linebreak,o="",a=0;a-1?n.substr(0,i-1):n;e.style.setProperty(t,o,i>-1?"important":"")}}catch(a){return!1}return!0},ae=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(r){}},se=function(e,t){return e.selectorText=t,e.selectorText===t},ce=ne((function(){return document.querySelector("head")}));function le(e){var t=X.registry;if(t.length>0){var r=function(e,t){for(var r=0;rt.index&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.attached&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=e.insertionPoint;if(n&&"string"===typeof n){var i=function(e){for(var t=ce(),r=0;rr?r:t},he=function(){var e=document.createElement("style");return e.textContent="\n",e},pe=function(){function e(e){this.getPropertyValue=ie,this.setProperty=oe,this.removeProperty=ae,this.setSelector=se,this.hasInsertedRules=!1,this.cssRules=[],e&&X.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},r=t.media,n=t.meta,i=t.element;this.element=i||he(),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),n&&this.element.setAttribute("data-meta",n);var o=ue();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var r=t.insertionPoint,n=le(t);if(!1!==n&&n.parent)n.parent.insertBefore(e,n.node);else if(r&&"number"===typeof r.nodeType){var i=r,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var r=0;r{e=r.nmd(e);var n=200,i="__lodash_hash_undefined__",o=1,a=2,s=9007199254740991,c="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",h="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",v="[object Number]",y="[object Null]",b="[object Object]",w="[object Promise]",x="[object Proxy]",_="[object RegExp]",E="[object Set]",k="[object String]",S="[object Symbol]",A="[object Undefined]",M="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",T=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[c]=O[l]=O[C]=O[d]=O[I]=O[f]=O[h]=O[p]=O[g]=O[v]=O[b]=O[_]=O[E]=O[k]=O[M]=!1;var R="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,N="object"==typeof self&&self&&self.Object===Object&&self,B=R||N||Function("return this")(),L=t&&!t.nodeType&&t,j=L&&e&&!e.nodeType&&e,D=j&&j.exports===L,F=D&&R.process,U=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),z=U&&U.isTypedArray;function Z(e,t){for(var r=-1,n=null==e?0:e.length;++rl))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,h=!0,p=r&a?new Me:void 0;for(s.set(e,t),s.set(t,e);++f-1},Se.prototype.set=function(e,t){var r=this.__data__,n=Te(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Ae.prototype.clear=function(){this.size=0,this.__data__={hash:new ke,map:new(fe||Se),string:new ke}},Ae.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ae.prototype.get=function(e){return De(this,e).get(e)},Ae.prototype.has=function(e){return De(this,e).has(e)},Ae.prototype.set=function(e,t){var r=De(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Me.prototype.add=Me.prototype.push=function(e){return this.__data__.set(e,i),this},Me.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new Se,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Se){var i=r.__data__;if(!fe||i.length-1&&e%1==0&&e-1&&e%1==0&&e<=s}function Ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Je(e){return null!=e&&"object"==typeof e}var Xe=z?function(e){return function(t){return e(t)}}(z):function(e){return Je(e)&&Ge(e.length)&&!!O[Pe(e)]};function Qe(e){return null!=(t=e)&&Ge(t.length)&&!Ke(t)?Ie(e):Be(e);var t}e.exports=function(e,t){return Re(e,t)}},49137:(e,t,r)=>{"use strict";var n=r(47110),i=r(56423),o=r(38608).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<>>32-t}function l(e,t,r,n,i,o,a){return c(e+(t&r|~t&n)+i+o|0,a)+t|0}function u(e,t,r,n,i,o,a){return c(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return c(e+(t^r^n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return c(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=l(r,n,i,o,e[0],3614090360,7),o=l(o,r,n,i,e[1],3905402710,12),i=l(i,o,r,n,e[2],606105819,17),n=l(n,i,o,r,e[3],3250441966,22),r=l(r,n,i,o,e[4],4118548399,7),o=l(o,r,n,i,e[5],1200080426,12),i=l(i,o,r,n,e[6],2821735955,17),n=l(n,i,o,r,e[7],4249261313,22),r=l(r,n,i,o,e[8],1770035416,7),o=l(o,r,n,i,e[9],2336552879,12),i=l(i,o,r,n,e[10],4294925233,17),n=l(n,i,o,r,e[11],2304563134,22),r=l(r,n,i,o,e[12],1804603682,7),o=l(o,r,n,i,e[13],4254626195,12),i=l(i,o,r,n,e[14],2792965006,17),r=u(r,n=l(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=u(o,r,n,i,e[6],3225465664,9),i=u(i,o,r,n,e[11],643717713,14),n=u(n,i,o,r,e[0],3921069994,20),r=u(r,n,i,o,e[5],3593408605,5),o=u(o,r,n,i,e[10],38016083,9),i=u(i,o,r,n,e[15],3634488961,14),n=u(n,i,o,r,e[4],3889429448,20),r=u(r,n,i,o,e[9],568446438,5),o=u(o,r,n,i,e[14],3275163606,9),i=u(i,o,r,n,e[3],4107603335,14),n=u(n,i,o,r,e[8],1163531501,20),r=u(r,n,i,o,e[13],2850285829,5),o=u(o,r,n,i,e[2],4243563512,9),i=u(i,o,r,n,e[7],1735328473,14),r=d(r,n=u(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),r=f(r,n=d(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=f(o,r,n,i,e[7],1126891415,10),i=f(i,o,r,n,e[14],2878612391,15),n=f(n,i,o,r,e[5],4237533241,21),r=f(r,n,i,o,e[12],1700485571,6),o=f(o,r,n,i,e[3],2399980690,10),i=f(i,o,r,n,e[10],4293915773,15),n=f(n,i,o,r,e[1],2240044497,21),r=f(r,n,i,o,e[8],1873313359,6),o=f(o,r,n,i,e[15],4264355552,10),i=f(i,o,r,n,e[6],2734768916,15),n=f(n,i,o,r,e[13],1309151649,21),r=f(r,n,i,o,e[4],4149444226,6),o=f(o,r,n,i,e[11],3174756917,10),i=f(i,o,r,n,e[2],718787259,15),n=f(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},43970:(e,t,r)=>{var n=r(7230),i=r(32604);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var l=e.shrn(c),u=s.toRed(o);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var f=d.toRed(o).redPow(l);if(0!==f.cmp(a)&&0!==f.cmp(u)){for(var h=1;h0;t--){var u=this._randrange(new n(2),a),d=e.gcd(u);if(0!==d.cmpn(1))return d;var f=u.toRed(i).redPow(c);if(0!==f.cmp(o)&&0!==f.cmp(l)){for(var h=1;h=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,d=67108863&c,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,l=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,_=0|a[4],E=8191&_,k=_>>>13,S=0|a[5],A=8191&S,M=S>>>13,C=0|a[6],I=8191&C,T=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,N=0|a[8],B=8191&N,L=N>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,Z=U>>>13,q=0|s[1],H=8191&q,V=q>>>13,W=0|s[2],$=8191&W,K=W>>>13,G=0|s[3],Y=8191&G,J=G>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,le=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,Z))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,Z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,Z))+Math.imul(m,z)|0,o=Math.imul(m,Z);var ve=(l+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,Z))+Math.imul(y,z)|0,o=Math.imul(y,Z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,V)|0;var ye=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,Z))+Math.imul(x,z)|0,o=Math.imul(x,Z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Y)|0))<<13)|0;l=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,Z))+Math.imul(k,z)|0,o=Math.imul(k,Z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0;var we=(l+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,Z))+Math.imul(M,z)|0,o=Math.imul(M,Z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var xe=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;l=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,Z))+Math.imul(T,z)|0,o=Math.imul(T,Z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,Z))+Math.imul(R,z)|0,o=Math.imul(R,Z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ce)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,Z))+Math.imul(L,z)|0,o=Math.imul(L,Z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(l+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,Z))+Math.imul(F,z)|0,o=Math.imul(F,Z),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Se=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,V))+Math.imul(F,H)|0,o=Math.imul(F,V),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,le)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ae=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,K))+Math.imul(F,$)|0,o=Math.imul(F,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Me=(l+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;l=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,J))+Math.imul(F,Y)|0,o=Math.imul(F,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,le)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ce=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,le)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,fe)|0;var Te=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(T,pe)|0))<<13)|0;l=((o=o+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,ce),i=(i=Math.imul(D,le))+Math.imul(F,ce)|0,o=Math.imul(F,le),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,fe)|0;var Oe=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,de),i=(i=Math.imul(D,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(l+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(L,pe)|0))<<13)|0;l=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(l+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=ge,c[1]=ve,c[2]=ye,c[3]=be,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=ke,c[9]=Se,c[10]=Ae,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=Te,c[15]=Pe,c[16]=Oe,c[17]=Re,c[18]=Ne,0!==l&&(c[19]=l,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var l=0;l=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(l)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var d=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},13859:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},99475:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},41749:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{"use strict";var n=r(37904);t.certificate=r(33013);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),c=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=c;var l=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=l;var u=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=u,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var d=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=d;var f=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},33013:(e,t,r)=>{"use strict";var n=r(37904),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),c=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),l=n.define("RDNSequence",(function(){this.seqof(c)})),u=n.define("Name",(function(){this.choice({rdnSequence:this.use(l)})})),d=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),f=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(u),this.key("validity").use(d),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},99121:(e,t,r)=>{var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(23523),s=r(96436),c=r(38608).Buffer;e.exports=function(e,t){var r,l=e.toString(),u=l.match(n);if(u){var d="aes"+u[1],f=c.from(u[2],"hex"),h=c.from(u[3].replace(/[\r\n]/g,""),"base64"),p=a(t,f.slice(0,8),parseInt(u[1],10)).key,m=[],g=s.createDecipheriv(d,p,f);m.push(g.update(h)),m.push(g.final()),r=c.concat(m)}else{var v=l.match(o);r=c.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:l.match(i)[1],data:r}}},68821:(e,t,r)=>{var n=r(23881),i=r(22562),o=r(99121),a=r(96436),s=r(7062),c=r(38608).Buffer;function l(e){var t;"object"!==typeof e||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"===typeof e&&(e=c.from(e));var r,l,u=o(e,t),d=u.tag,f=u.data;switch(d){case"CERTIFICATE":l=n.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=n.PublicKey.decode(f,"der")),r=l.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=n.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":f=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],l=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,d=parseInt(o.split("-")[1],10)/8,f=s.pbkdf2Sync(t,r,n,d,"sha1"),h=a.createDecipheriv(o,f,l),p=[];return p.push(h.update(u)),p.push(h.final()),c.concat(p)}(f=n.EncryptedPrivateKey.decode(f,"der"),t);case"PRIVATE KEY":switch(r=(l=n.PrivateKey.decode(f,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:n.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=n.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=n.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=l,l.signature=n.signature},53774:(e,t,r)=>{"use strict";var n=r(54501);function i(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function o(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",i=0):i=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var a={resolve:function(){for(var e,t="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=n.cwd()),s=e),i(s),0!==s.length&&(t=s+"/"+t,r=47===s.charCodeAt(0))}return t=o(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(i(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=o(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return i(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":a.normalize(e)},relative:function(e,t){if(i(e),i(t),e===t)return"";if((e=a.resolve(e))===(t=a.resolve(t)))return"";for(var r=1;rl){if(47===t.charCodeAt(s+d))return t.slice(s+d+1);if(0===d)return t.slice(s+d)}else o>l&&(47===e.charCodeAt(r+d)?u=d:0===d&&(u=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(s+d))break;47===f&&(u=d)}var h="";for(d=r+u+1;d<=n;++d)d!==n&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(s+u):(s+=u,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(i(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!o){n=a;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');i(e);var r,n=0,o=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!a){n=r+1;break}}else-1===c&&(a=!1,c=r+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(o=r):(s=-1,o=c))}return n===o?o=c:-1===o&&(o=e.length),e.slice(n,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){n=r+1;break}}else-1===o&&(a=!1,o=r+1);return-1===o?"":e.slice(n,o)},extname:function(e){i(e);for(var t=-1,r=0,n=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===n&&(o=!1,n=s+1),46===c?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!o){r=s+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}("/",e)},parse:function(e){i(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),o=47===n;o?(t.root="/",r=1):r=0;for(var a=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(n=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===n?-1===a?a=u:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){s=u+1;break}return-1===a||-1===c||0===d||1===d&&a===c-1&&a===s+1?-1!==c&&(t.base=t.name=0===s&&o?e.slice(1,c):e.slice(s,c)):(0===s&&o?(t.name=e.slice(1,a),t.base=e.slice(1,c)):(t.name=e.slice(s,a),t.base=e.slice(s,c)),t.ext=e.slice(a,c)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},19264:(e,t,r)=>{var n=r(11904);e.exports=h,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=f;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var r,n=[],o=0,a=0,s="",u=t&&t.delimiter||"/";null!=(r=i.exec(e));){var d=r[0],f=r[1],h=r.index;if(s+=e.slice(a,h),a=h+d.length,f)s+=f[1];else{var p=e[a],m=r[2],g=r[3],v=r[4],y=r[5],b=r[6],w=r[7];s&&(n.push(s),s="");var x=null!=m&&null!=p&&p!==m,_="+"===b||"*"===b,E="?"===b||"*"===b,k=r[2]||u,S=v||y;n.push({name:g||o++,prefix:m||"",delimiter:k,optional:E,repeat:_,partial:x,asterisk:!!w,pattern:S?l(S):w?".*":"[^"+c(k)+"]+?"})}}return a{t.pbkdf2=r(60915),t.pbkdf2Sync=r(94560)},60915:(e,t,r)=>{var n,i,o=r(38608).Buffer,a=r(56779),s=r(16350),c=r(94560),l=r(17437),u=r.g.crypto&&r.g.crypto.subtle,d={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},f=[];function h(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(e,t,r,n,i){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,i,m,g,v){"function"===typeof g&&(v=g,g=void 0);var y=d[(g=g||"sha1").toLowerCase()];if(y&&"function"===typeof r.g.Promise){if(a(i,m),e=l(e,s,"Password"),t=l(t,s,"Salt"),"function"!==typeof v)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==f[e])return f[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return f[e]=t,t}(y).then((function(r){return r?p(e,t,i,m,y):c(e,t,i,m,g)})),v)}else h()((function(){var r;try{r=c(e,t,i,m,g)}catch(n){return v(n)}v(null,r)}))}},16350:(e,t,r)=>{var n,i=r(54501);if(r.g.process&&r.g.process.browser)n="utf-8";else if(r.g.process&&r.g.process.version){n=parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";e.exports=n},56779:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!==typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!==typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!==r)throw new TypeError("Bad key length")}},94560:(e,t,r)=>{var n=r(6199),i=r(78816),o=r(7372),a=r(38608).Buffer,s=r(56779),c=r(16350),l=r(17437),u=a.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(e,t,r){var s=function(e){function t(t){return o(e).update(t).digest()}function r(e){return(new i).update(e).digest()}return"rmd160"===e||"ripemd160"===e?r:"md5"===e?n:t}(e),c="sha512"===e||"sha384"===e?128:64;t.length>c?t=s(t):t.length{var n=r(38608).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"===typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},97376:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Children:()=>ye,Component:()=>b,Fragment:()=>y,PureComponent:()=>he,Suspense:()=>xe,SuspenseList:()=>ke,cloneElement:()=>Ue,createContext:()=>D,createElement:()=>m,createFactory:()=>De,createPortal:()=>Ce,createRef:()=>v,default:()=>He,findDOMNode:()=>Ze,forwardRef:()=>ge,hydrate:()=>Oe,isValidElement:()=>Fe,lazy:()=>Ee,memo:()=>pe,render:()=>Pe,unmountComponentAtNode:()=>ze,unstable_batchedUpdates:()=>qe,useCallback:()=>re,useContext:()=>ne,useDebugValue:()=>ie,useEffect:()=>J,useErrorBoundary:()=>oe,useImperativeHandle:()=>ee,useLayoutEffect:()=>X,useMemo:()=>te,useReducer:()=>Y,useRef:()=>Q,useState:()=>G,version:()=>je});var n,i,o,a,s,c,l,u={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function h(e,t){for(var r in t)e[r]=t[r];return e}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function m(e,t,r){var n,i=arguments,o={};for(n in t)"key"!==n&&"ref"!==n&&(o[n]=t[n]);if(arguments.length>3)for(r=[r],n=3;n2&&(t.children=d.slice.call(arguments,2)),r={},t)"key"!==n&&"ref"!==n&&(r[n]=t[n]);return g(e.type,r,t.key||e.key,t.ref||e.ref,null)}function D(e){var t={},r={__c:"__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i=this;return this.getChildContext||(n=[],this.getChildContext=function(){return t[r.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&n.some((function(t){t.context=e.value,_(t)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}n={__e:function(e,t){for(var r,n;t=t.__;)if((r=t.__c)&&!r.__)try{if(r.constructor&&null!=r.constructor.getDerivedStateFromError&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(e))),null!=r.componentDidCatch&&(n=!0,r.componentDidCatch(e)),n)return _(r.__E=r)}catch(t){e=t}throw e}},b.prototype.setState=function(e,t){var r;r=this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(r,this.props)),e&&h(r,e),null!=e&&this.__v&&(t&&this.__h.push(t),_(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_(this))},b.prototype.render=y,i=[],o=0,a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=u,l=0;var F,U,z,Z=0,q=[],H=n.__r,V=n.diffed,W=n.__c,$=n.unmount;function K(e,t){n.__h&&n.__h(U,e,Z||t),Z=0;var r=U.__H||(U.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function G(e){return Z=1,Y(ue,e)}function Y(e,t,r){var n=K(F++,2);return n.__c||(n.__c=U,n.__=[r?r(t):ue(void 0,t),function(t){var r=e(n.__[0],t);n.__[0]!==r&&(n.__[0]=r,n.__c.setState({}))}]),n.__}function J(e,t){var r=K(F++,3);!n.__s&&le(r.__H,t)&&(r.__=e,r.__H=t,U.__H.__h.push(r))}function X(e,t){var r=K(F++,4);!n.__s&&le(r.__H,t)&&(r.__=e,r.__H=t,U.__h.push(r))}function Q(e){return Z=5,te((function(){return{current:e}}),[])}function ee(e,t,r){Z=6,X((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==r?r:r.concat(e))}function te(e,t){var r=K(F++,7);return le(r.__H,t)?(r.__H=t,r.__h=e,r.__=e()):r.__}function re(e,t){return Z=8,te((function(){return e}),t)}function ne(e){var t=U.context[e.__c],r=K(F++,9);return r.__c=e,t?(null==r.__&&(r.__=!0,t.sub(U)),t.props.value):e.__}function ie(e,t){n.useDebugValue&&n.useDebugValue(t?t(e):e)}function oe(e){var t=K(F++,10),r=G();return t.__=e,U.componentDidCatch||(U.componentDidCatch=function(e){t.__&&t.__(e),r[1](e)}),[r[0],function(){r[1](void 0)}]}function ae(){q.some((function(e){if(e.__P)try{e.__H.__h.forEach(se),e.__H.__h.forEach(ce),e.__H.__h=[]}catch(i){return e.__H.__h=[],n.__e(i,e.__v),!0}})),q=[]}function se(e){e.t&&e.t()}function ce(e){var t=e.__();"function"==typeof t&&(e.t=t)}function le(e,t){return!e||t.some((function(t,r){return t!==e[r]}))}function ue(e,t){return"function"==typeof t?t(e):t}function de(e,t){for(var r in t)e[r]=t[r];return e}function fe(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}n.__r=function(e){H&&H(e),F=0,(U=e.__c).__H&&(U.__H.__h.forEach(se),U.__H.__h.forEach(ce),U.__H.__h=[])},n.diffed=function(e){V&&V(e);var t=e.__c;if(t){var r=t.__H;r&&r.__h.length&&(1!==q.push(t)&&z===n.requestAnimationFrame||((z=n.requestAnimationFrame)||function(e){var t,r=function(){clearTimeout(n),cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);"undefined"!=typeof window&&(t=requestAnimationFrame(r))})(ae))}},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(se),e.__h=e.__h.filter((function(e){return!e.__||ce(e)}))}catch(s){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(s,e.__v)}})),W&&W(e,t)},n.unmount=function(e){$&&$(e);var t=e.__c;if(t){var r=t.__H;if(r)try{r.__.forEach((function(e){return e.t&&e.t()}))}catch(e){n.__e(e,t.__v)}}};var he=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).isPureReactComponent=!0,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.shouldComponentUpdate=function(e,t){return fe(this.props,e)||fe(this.state,t)},n}(b);function pe(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:fe(this.props,e)}function n(t){return this.shouldComponentUpdate=r,m(e,de({},t))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(e.displayName||e.name)+")",n.t=!0,n}var me=n.__b;function ge(e){function t(t){var r=de({},t);return delete r.ref,e(r,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}n.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),me&&me(e)};var ve=function(e,t){return e?S(e).reduce((function(e,r,n){return e.concat(t(r,n))}),[]):null},ye={map:ve,forEach:ve,count:function(e){return e?S(e).length:0},only:function(e){if(1!==(e=S(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:S},be=n.__e;function we(e){return e&&((e=de({},e)).__c=null,e.__k=e.__k&&e.__k.map(we)),e}function xe(){this.__u=0,this.o=null,this.__b=null}function _e(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function Ee(e){var t,r,n;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return m(r,i)}return i.displayName="Lazy",i.t=!0,i}function ke(){this.i=null,this.l=null}n.__e=function(e,t,r){if(e.then)for(var n,i=t;i=i.__;)if((n=i.__c)&&n.__c)return n.__c(e,t.__c);be(e,t,r)},(xe.prototype=new b).__c=function(e,t){var r=this;null==r.o&&(r.o=[]),r.o.push(t);var n=_e(r.__v),i=!1,o=function(){i||(i=!0,n?n(a):a())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var a=function(){var e;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});e=r.o.pop();)e.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),e.then(o,o)},xe.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=we(this.__b),this.__b=null),[m(b,null,t.u?null:e.children),t.u&&e.fallback]};var Se=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,c=[],l=!1,u=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):u=-1,c.length&&f())}function f(){if(!l){var e=a(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++u1)for(var r=1;r{"use strict";var n=r(50954);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},84108:(e,t,r)=>{e.exports=r(61854)()},50954:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},19568:(e,t,r)=>{t.publicEncrypt=r(90539),t.privateDecrypt=r(43576),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},93612:(e,t,r)=>{var n=r(46764),i=r(38608).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,a=i.alloc(0),s=0;a.length=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,d=67108863&c,f=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=f;h++){var p=l-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,l=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,x=b>>>13,_=0|a[4],E=8191&_,k=_>>>13,S=0|a[5],A=8191&S,M=S>>>13,C=0|a[6],I=8191&C,T=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,N=0|a[8],B=8191&N,L=N>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,Z=U>>>13,q=0|s[1],H=8191&q,V=q>>>13,W=0|s[2],$=8191&W,K=W>>>13,G=0|s[3],Y=8191&G,J=G>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,le=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(l+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,Z))+Math.imul(f,z)|0))<<13)|0;l=((o=Math.imul(f,Z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,Z))+Math.imul(m,z)|0,o=Math.imul(m,Z);var ve=(l+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(f,H)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,Z))+Math.imul(y,z)|0,o=Math.imul(y,Z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,V)|0;var ye=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,Z))+Math.imul(x,z)|0,o=Math.imul(x,Z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,Y)|0))<<13)|0;l=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,Z))+Math.imul(k,z)|0,o=Math.imul(k,Z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0;var we=(l+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;l=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,Z))+Math.imul(M,z)|0,o=Math.imul(M,Z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var xe=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;l=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,Z))+Math.imul(T,z)|0,o=Math.imul(T,Z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;l=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,Z))+Math.imul(R,z)|0,o=Math.imul(R,Z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(l+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ce)|0))<<13)|0;l=((o=o+Math.imul(f,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,Z))+Math.imul(L,z)|0,o=Math.imul(L,Z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var ke=(l+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,Z))+Math.imul(F,z)|0,o=Math.imul(F,Z),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Se=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;l=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,V))+Math.imul(F,H)|0,o=Math.imul(F,V),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,le)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Ae=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,K))+Math.imul(F,$)|0,o=Math.imul(F,K),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Me=(l+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;l=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,J))+Math.imul(F,Y)|0,o=Math.imul(F,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,le)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,fe)|0;var Ce=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0;l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,le)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,fe)|0;var Te=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(T,pe)|0))<<13)|0;l=((o=o+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,ce),i=(i=Math.imul(D,le))+Math.imul(F,ce)|0,o=Math.imul(F,le),n=n+Math.imul(B,de)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,fe)|0;var Oe=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,pe)|0))<<13)|0;l=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,de),i=(i=Math.imul(D,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(l+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(L,pe)|0))<<13)|0;l=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(l+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=ge,c[1]=ve,c[2]=ye,c[3]=be,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=ke,c[9]=Se,c[10]=Ae,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=Te,c[15]=Pe,c[16]=Oe,c[17]=Re,c[18]=Ne,0!==l&&(c[19]=l,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var l=0;l=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(l)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var d=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},43576:(e,t,r)=>{var n=r(68821),i=r(93612),o=r(88182),a=r(89585),s=r(41191),c=r(46764),l=r(62119),u=r(38608).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var f,h=n(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");f=r?l(new a(t),h):s(t,h);var m=u.alloc(p-f.length);if(f=u.concat([m,f],p),4===d)return function(e,t){var r=e.modulus.byteLength(),n=c("sha1").update(u.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),l=t.slice(a+1),d=o(s,i(l,a)),f=o(l,i(d,r-a-1));if(function(e,t){e=u.from(e),t=u.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i=t.length){o++;break}var a=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,f,r);if(3===d)return f;throw new Error("unknown padding")}},90539:(e,t,r)=>{var n=r(68821),i=r(76581),o=r(46764),a=r(93612),s=r(88182),c=r(89585),l=r(62119),u=r(41191),d=r(38608).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var h,p=n(e);if(4===f)h=function(e,t){var r=e.modulus.byteLength(),n=t.length,l=o("sha1").update(d.alloc(0)).digest(),u=l.length,f=2*u;if(n>r-f-2)throw new Error("message too long");var h=d.alloc(r-n-f-2),p=r-u-1,m=i(u),g=s(d.concat([l,h,d.alloc(1,1),t],p),a(m,p)),v=s(m,a(g,u));return new c(d.concat([d.alloc(1),v,g],r))}(p,t);else if(1===f)h=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");n=r?d.alloc(a-o-3,255):function(e){var t,r=d.allocUnsafe(e),n=0,o=i(2*e),a=0;for(;n=0)throw new Error("data too long for modulus")}return r?u(h,p):l(h,p)}},62119:(e,t,r)=>{var n=r(89585),i=r(38608).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},88182:e=>{e.exports=function(e,t){for(var r=e.length,n=-1;++n{"use strict";function t(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"===typeof e&&null!==e){var o=r.length+1;if(1===o)return e;var a=new Array(o);a[0]=i(e);for(var s=1;s-1?d:0,e.charCodeAt(h+1)){case 100:case 102:if(u>=c)break;if(null==r[u])break;d=c)break;if(null==r[u])break;d=c)break;if(void 0===r[u])break;d",d=h+2,h++;break}l+=i(r[u]),d=h+2,h++;break;case 115:if(u>=c)break;d{"use strict";var n=r(54501),i=65536,o=4294967295;var a=r(38608).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(e);if(e>0)if(e>i)for(var c=0;c{"use strict";var n=r(54501);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(38608),a=r(76581),s=o.Buffer,c=o.kMaxLength,l=r.g.crypto||r.g.msCrypto,u=Math.pow(2,32)-1;function d(e,t){if("number"!==typeof e||e!==e)throw new TypeError("offset must be a number");if(e>u||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function f(e,t,r){if("number"!==typeof e||e!==e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>c)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return l.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}l&&l.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!s.isBuffer(e)&&!(e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof t)i=t,t=0,n=e.length;else if("function"===typeof n)i=n,n=e.length-t;else if("function"!==typeof i)throw new TypeError('"cb" argument must be a function');return d(t,e.length),f(n,t,e.length),h(e,t,n,i)},t.randomFillSync=function(e,t,n){"undefined"===typeof t&&(t=0);if(!s.isBuffer(e)&&!(e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');d(t,e.length),void 0===n&&(n=e.length-t);return f(n,t,e.length),h(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},23522:(e,t,r)=>{"use strict";var n=r(83358),i=r(41749),o=r(94824);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r