diff --git a/3571.8e3c3594.bundle.js b/3571.5a632e3b.bundle.js similarity index 55% rename from 3571.8e3c3594.bundle.js rename to 3571.5a632e3b.bundle.js index c05aed2..1f5d3e2 100644 --- a/3571.8e3c3594.bundle.js +++ b/3571.5a632e3b.bundle.js @@ -1 +1 @@ -(self.webpackChunkbingo_frontend=self.webpackChunkbingo_frontend||[]).push([[3571],{1827:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(74942),i=n(67294),r=n(2804),s=n(89082);const l=n.p+"55fc1028991d40506e2e7011ce0dc5e2.mp4";function o(e){let{}=e;const t=(0,i.useRef)(null),n=(0,r.sJ)(s.io),o=(0,r.Zl)(s.io);return i.createElement(i.Fragment,null,i.createElement(a.t9,{isOpen:n,onDismiss:()=>{t.current.pause(),o(!1)}},i.createElement(a.cZ,{style:{background:"#000",padding:"0",width:"1200px"}},i.createElement("video",{controls:!0,width:"100%",ref:t},i.createElement("source",{src:l,type:"video/mp4"})))))}},6087:(e,t,n)=>{"use strict";n.d(t,{VH:()=>l});var a=n(71210),i=n(9163);n(47631);let r;const s=async()=>{if(window.ethereum)return new a.Q(window.ethereum);if(window.web3)return new a.Q(window.web3.currentProvider);throw new Error("can't find default provider")},l=e=>new Promise((async(t,n)=>{if(e)t(new i.r(e));else if(r)t(r);else{const e=await s();e?(r=e,t(e)):n("can't find default provider")}}));window.addEventListener("load",(async()=>{s()}))},43733:(e,t,n)=>{"use strict";n.d(t,{id:()=>s,ZP:()=>l});var a=n(50490),i=n(47631),r=n(5975);n(59619),n(63829);const s=e=>{let{address:t,library:n,account:i}=e;return(0,r.xi)({address:t,abi:a,library:n,account:i})};const l=(e,t,n)=>(0,r.uN)({abi:a,address:null!=t?t:(0,i.$y)(e,i.iJ.Lobby),signer:n,chainId:e})},2039:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(95534),i=n.n(a),r=n(63677),s=n(6087),l=n(47631);const o=async e=>{try{const t=null!=e?e:await(async()=>{const e=await(0,s.VH)(),t=await e.getNetwork();if(!Object.values(l.a_).includes(t.chainId))throw new Error("Network not supported");return t.chainId})(),n=await(0,s.VH)(i()(l.Vl[t]));return new r.m({ethersProvider:n,tryAggregate:!1,multicallCustomContractAddress:l.QO[t].multicall})}catch(e){return void console.error("Getting multicall failure:",e)}}},61664:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(67294);function i(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=(0,a.useRef)();(0,a.useEffect)((()=>{i.current=e}),[e]),(0,a.useEffect)((()=>{function e(){const e=i.current;e&&e()}if(null!==t){n&&e();const a=setInterval(e,t);return()=>clearInterval(a)}}),[t,n])}},29562:(e,t,n)=>{"use strict";n.d(t,{h:()=>d,G:()=>y});var a=n(50490),i=n(44431),r=n.n(i),s=n(67294),l=n(47631),o=n(43733),u=n(2039),p=n(74001),m=n(62882);n(80941),n(88017);const d=()=>{const[e,t]=(0,s.useState)(),[n,a]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{(0,p.Z)({contractFun:o.ZP,contracts:{contractName:l.iJ.Lobby,method:"recentGames",params:["0"]},defaultValue:null}).then((async e=>{try{const n=new Map;for(let a=0;ae.gameId.toString())),{gameInfo:l}=await y({chainId:i,gameIdList:s})||{};if(l){const e=r.map(((e,t)=>(0,m.O)({chainId:i,game:e,gameIdInfo:l[t]})));n.set(i,e)}n.size&&t(n)}}catch(e){a(!0)}}))}),[]),{list:e,hasError:n}},y=async e=>{let{chainId:t,gameIdList:n}=e;try{const e=(0,l.$y)(t,l.iJ.Lobby),i=n.map((t=>({reference:l.iJ.Lobby+t,contractAddress:e,abi:a,calls:[{methodName:"getGameInfo",reference:"getGameInfo",methodParameters:[t]}]}))),s=await(0,u.Z)(t);if(s){const{results:e}=await s.call(i);if(e){return{gameInfo:Object.values(e).map((e=>{const t=e.callsReturnContext[0].returnValues;return[t[0],t[1],new(r())(t[2].hex).dividedBy(l.$d).toString(),t[3],new(r())(t[4].hex).dividedBy(l.$d).toString(),t[5],t[6],t[7]]}))}}}}catch(e){console.error("getGameInfo err: ",e)}}},8219:(e,t,n)=>{"use strict";n.d(t,{i:()=>u,e:()=>o});var a=n(94184),i=n.n(a),r=n(67294);const s="widget_title__E8aNg",l="widget_list__0eYOt",o=(0,r.memo)((e=>{let{label:t}=e;return r.createElement("h3",{className:s},t)})),u=(0,r.memo)((e=>{let{className:t,children:n}=e;return r.createElement("div",{className:i()(l,t)},n)}))},4049:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Be});var a=n(18446),i=n.n(a),r=n(67294),s=n(44431),l=n.n(s),o=n(46474),u=n(2804),p=n(21449),m=n(43733);const d=JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRepay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getResidue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"debt_","type":"uint256"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"repayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]');var y=n(47631),c=n(5975);const b=(e,t,n)=>(0,c.uN)({abi:d,address:null!=t?t:(0,y.$y)(e,y.iJ.ZypherGameToken),signer:n,chainId:e});var f=n(10271),g=n(59619),T=n(61664),h=n(29562),v=n(9120),w=n(95362),E=n(74001);const _=(e,t)=>e.reduce(((e,n)=>new(l())(n.response[t]).plus(new(l())(e)).toString()),0),x=(e,t,n)=>e.reduce(((e,a)=>{let i=new(l())(0);t&&n&&(i=new(l())(n[y.F[a.chainId]]));return new(l())(a.response.toString()).times(i).plus(new(l())(e)).toString()}),"0");var M=n(88017),N=n(7085),I=n(94184),R=n.n(I),C=n(79655),G=n(1827),A=n(80652),O=n(20825),P=n(89082),B=n(59314);const D=(0,u.cn)({key:"dailyRewardsRuleDialog",default:!1,effects_UNSTABLE:[(0,B.Nh)("dailyRewardsRuleDialog")]}),S={header:"banner_header__Okx8j",headerFl:"banner_headerFl__UAbjr",headerFr:"banner_headerFr__KuVjm",banner:"banner_banner__Q6u1g",bannerbg:"banner_bannerbg__SJvR+",bannerInner:"banner_bannerInner__LblfL",bannerFlInnerImg:"banner_bannerFlInnerImg__VoKj7",bannerFlBtnWrap:"banner_bannerFlBtnWrap__mPQtQ",bannerFlBtn:"banner_bannerFlBtn__VrxZn",gameRuleBtnImg:"banner_gameRuleBtnImg__lD2Un",headerFrInner:"banner_headerFrInner__eBXcD",h23:"banner_h23__N8sGi",h22:"banner_h22__mAx37",h21:"banner_h21__mWVCf",flex:"banner_flex__Zf2ee",headerFrInnerBg:"banner_headerFrInnerBg__y2uro",btn:"banner_btn__9aiLm",btnLoading:"banner_btnLoading__ASkm9",btnClaimed:"banner_btnClaimed__ciL3A",data:"banner_data__u0ddC",dataMain:"banner_dataMain__zAdC8",item:"banner_item__iAxoF",dataImg:"banner_dataImg__4Odtt",itemDetail:"banner_itemDetail__qNbOv",tit:"banner_tit__LPzBj",mun:"banner_mun__BTPzt",tooltip:"banner_tooltip__s6UwQ"};n(1025);var k=n(65400),L=n(54549),Z=n(74942);const F={dialogContent:"DailyRewardsRuleDialog_dialogContent__qqbV2",cursor:"DailyRewardsRuleDialog_cursor__II0OJ",dialogHeader:"DailyRewardsRuleDialog_dialogHeader__b2JIY",dialogContainer:"DailyRewardsRuleDialog_dialogContainer__yxHFf",btnWrap:"DailyRewardsRuleDialog_btnWrap__TBOZ4",btn:"DailyRewardsRuleDialog_btn__76dqo"},V=()=>{const e=(0,u.sJ)(D),t=(0,u.Zl)(D),n=(0,r.useCallback)((()=>{t(!1)}),[]);return r.createElement(r.Fragment,null,r.createElement(Z.t9,{isOpen:e,onDismiss:n},r.createElement(Z.cZ,{className:F.dialogContent},r.createElement("div",{className:F.dialogHeader},r.createElement("h3",null,"Rules"),r.createElement("div",{className:F.cursor,onClick:n},r.createElement(L.Z,null))),r.createElement("div",{className:F.dialogContainer},r.createElement("h4",null,"Daily Login Rewards: A Web3 Adventure Awaits!"),r.createElement("p",null,"Embark on the zBingo journey as we mark our V1 Grand Launch! With the Zypher gaming realm expanding, we're thrilled to enrich your experience with daily rewards."," ",r.createElement("a",{href:"https://medium.com/@ZypherGames/upcoming-announcement-44e69204adb1",target:"_blank",rel:"noreferrer"},"More Details")),r.createElement("h4",null,"📆 Event Duration: ",r.createElement("p",null,"9/26 2AM UTC - 10/10 2AM UTC")),r.createElement("h4",null," 🏆 Reward Mechanics:"),r.createElement("p",null,r.createElement("em",null),r.createElement("i",null,"Step into zBingo daily and pocket an electrifying 5,000 $GP (Gold Points)."),r.createElement("br",null),r.createElement("em",null),r.createElement("i",null,"Each unique address can claim the rewards once every 24 hours on each supported network."),r.createElement("br",null),r.createElement("em",null),r.createElement("i",null,"For our early adventurers, there's no ceiling! No initial cap on the number of participating wallets.")),r.createElement("h4",null,"Interpretation & Guidelines: "),r.createElement("p",null,"The project team reserves the right to interpret and determine the terms and conditions of the Daily Login Rewards event. If you have any questions please reach out to us on"," ",r.createElement("a",{href:"https://discord.com/invite/MKJZhS4p2T",target:"_blank",className:F.fontWhite,rel:"noreferrer"},"Discord")," ","of hello@zypher.game.")),r.createElement("div",{className:F.btnWrap},r.createElement(k.default,{className:F.btn,onClick:n},"Ok")))))};var j=n(1413);const z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};var U=n(6445),K=function(e,t){return r.createElement(U.Z,(0,j.Z)((0,j.Z)({},e),{},{ref:t,icon:z}))};K.displayName="ArrowRightOutlined";const J=r.forwardRef(K);var W,$,q=n(89250),Y=n(29163);function H(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Q=Y.ZP.div(W||(W=H(["\n border-radius: 50px;\n background: rgba(101, 237, 188, 0.1);\n padding: ",";\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n margin-top: ",";\n margin-bottom: ",";\n color: #65edbc;\n font-family: Poppins;\n font-weight: 400;\n font-size: ",";\n cursor: pointer;\n p {\n padding: ",";\n margin: 0;\n strong {\n font-weight: 600;\n }\n }\n img {\n position: absolute;\n top: 30%;\n transform: translateY(-50%);\n left: 50px;\n width: 160px;\n height: 160px;\n\n @media (max-width: 768px) {\n top: 30%;\n left: 4px;\n width: 58px;\n height: 58px;\n transform: translateY(-50%);\n }\n }\n"])),(e=>{let{isMobile:t}=e;return t?"0 20px":"0 50px"}),(e=>{let{isMobile:t}=e;return t?"28px":"100px"}),(e=>{let{isMobile:t}=e;return t?"12px":"64px"}),(e=>{let{isMobile:t}=e;return t?"12px":"22px"}),(e=>{let{isMobile:t}=e;return t?"10px 0 10px 50px":"33px 0 33px 200px"})),X=Y.ZP.div($||($=H(["\n padding: ",";\n color: #65edbc;\n background: rgba(101, 237, 188, 0.1);\n border: 1px solid #65edbc;\n border-radius: 28px;\n font-size: ",";\n margin-left: 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n white-space: nowrap;\n gap: 10px;\n"])),(e=>{let{isMobile:t}=e;return t?"4px 10px":"12px 20px"}),(e=>{let{isMobile:t}=e;return t?"12px":"16px"})),ee=(0,r.memo)((e=>{let{isMobile:t}=e;const n=(0,q.s0)(),a=(0,r.useCallback)((()=>{window.open("https://medium.com/@ZypherGames/upcoming-announcement-44e69204adb1","_blank")}),[n]);return r.createElement(Q,{onClick:a,isMobile:t},r.createElement("img",{src:"/img/home/Invitation_box.png"}),r.createElement("p",null,r.createElement("strong",null,"Launch Special: Top Up Now for Limited-Time Extra GP Airdrops!")),t?null:r.createElement(X,{isMobile:t},"Go ",r.createElement(J,null)))}));let te;!function(e){e.totalVault="totalVault",e.totalPoint="totalPoint",e.totalGame="totalGame",e.totalPlayers="totalPlayers",e.totalDebtObligation="totalDebtObligation",e.totalGpBurned="totalGpBurned"}(te||(te={}));const ne=(0,r.memo)((e=>{let{pointsStr:t,dayClaimed:n,claimHandle:a,isClaimLoading:i,claimConfKey:s}=e;const l=(0,u.Zl)(P.io),o=(0,u.Zl)(D),p=(0,v.d)(),m=(0,r.useMemo)((()=>{const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),8,26,2,0,0)),n=new Date(Date.UTC(e.getUTCFullYear(),9,10,2,0,0));return!(e>n)&&tl(!0),src:"/img/home/gameRule.png",alt:"gameRule",className:S.gameRuleBtnImg}),r.createElement(G.Z,null)))))),r.createElement("div",{className:S.headerFr},r.createElement("img",{src:"/img/home/banner02bg.png",alt:"points",className:S.bannerbg}),r.createElement("div",{className:S.headerFrInner},s&&s===O.cW.princely?r.createElement("h2",{className:S.h21},"DEAR GENESIS PLAYER",r.createElement("br",null)," DAILY REWARDS"):r.createElement(r.Fragment,null,r.createElement("h2",{className:S.h23,onClick:()=>o(!0)},"DAILY REWARDS (",r.createElement("i",null,"9/26 - 10/10"),")",r.createElement(A.Z,{name:"question_bg",className:S.question}),r.createElement(V,null)),r.createElement("h2",{className:S.h22},"LOG IN DAILY TO GET ",r.createElement("br",null),r.createElement("i",null,t)," $GP")),r.createElement(ae,{claimConfKey:s},n?r.createElement("p",{className:R()(S.btn,S.btnClaimed)},"CLAIMED"):m?r.createElement("div",{className:i?R()(S.btn,S.btnLoading):S.btn,onClick:a},"CLAIM",i&&r.createElement(N.Z,null)):r.createElement("p",{className:R()(S.btn,S.btnClaimed)},"CLAIM"))))),r.createElement(ee,{isMobile:p}))}),i()),ae=(0,r.memo)((e=>{let{className:t,claimConfKey:n,children:a}=e;return n&&n===O.cW.princely?r.createElement("div",{className:t}," ",a):r.createElement(r.Fragment,null,a)}),i()),ie=ne;n(15086);var re,se=n(94055),le=(n(54277),n(74048)),oe=n(8219);const ue=Y.ZP.div(re||(pe=["\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding: 3px 0;\n"],me||(me=pe.slice(0)),re=Object.freeze(Object.defineProperties(pe,{raw:{value:Object.freeze(me)}}))));var pe,me;const de=(0,r.memo)((e=>{let{total:t,className:n,dataKey:a,children:i}=e;try{return r.createElement(se.default,{overlayClassName:"datatooltip",title:r.createElement(le.default,{className:n,direction:"vertical",split:r.createElement(ue,null)},y.KC.map((e=>t[a][e]?r.createElement(ye,{key:e,chainId:e,dataKey:a,total:t}):null)))},i)}catch(e){return r.createElement(r.Fragment,null,i)}}),i()),ye=(0,r.memo)((e=>{var t;let{chainId:n,total:a,dataKey:i}=e;const s=(0,r.useMemo)((()=>{if(i===te.totalVault)return y.F[n];if(i===te.totalGame);else{if(i===te.totalPlayers)return"";if(i===te.totalPoint||i===te.totalDebtObligation||i===te.totalGpBurned)return"GP"}return""}),[]);return r.createElement(le.default,null,r.createElement("img",{src:y.Tf[n],alt:"",width:20}),null!==(t=a[i][n])&&void 0!==t?t:"",s)}),i()),ce=(0,r.memo)((e=>{let{data:t}=e;return r.createElement(oe.i,{className:S.data},r.createElement(oe.e,{label:"Data"}),r.createElement("div",{className:S.dataMain},[{title:"Value",value:"totalVault",dataKey:te.totalVault},{title:"Gold Points",img:"points",value:"totalPoint",dataKey:te.totalPoint},{title:"Games",value:"totalGame",dataKey:te.totalGame},{title:"Players",value:"totalPlayers",dataKey:te.totalPlayers},{title:"Debt Obligation",value:"totalDebtObligation",dataKey:te.totalDebtObligation},{title:"$GP Burned",value:"totalGpBurned",dataKey:te.totalGpBurned}].map((e=>{var n;return r.createElement("div",{className:S.item,key:e.title},r.createElement(de,{dataKey:e.dataKey,total:t.total,className:S.tooltip},r.createElement("img",{src:"/img/home/data_".concat(null!==(n=e.img)&&void 0!==n?n:e.title.toLowerCase(),".svg"),alt:"",className:S.dataImg}),r.createElement("div",{className:S.itemDetail},r.createElement("div",{className:S.tit},e.title),r.createElement("div",{className:S.mun},e.dataKey===te.totalVault?"$":"",t[e.value]))))}))))}),i()),be="games_games__GVWym",fe="games_main__Y0bTJ",ge="games_tit__kAdkf",Te="games_txt__YLmrR",he=(0,r.memo)((e=>{let{isMobile:t}=e;return r.createElement("div",{className:be},t?null:r.createElement(oe.e,{label:"Zypher Games"}),r.createElement("div",{className:fe},r.createElement("div",{className:ge},"Zypher Games"),r.createElement("div",{className:Te},"Zypher Games is an innovative on-chain gaming platform that provides a decentralized and provably fair gaming experience by harnessing the power of Zero-Knowledge Proofs (ZKPs) and Artificial Intelligence. It creates engaging and immersive fully on-chain games that showcase the transformative potential of combining blockchain and AI technology.")))}));var ve,we,Ee,_e=n(97005);function xe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Me=Y.ZP.div(ve||(ve=xe(["\n text-align: center;\n white-space: nowrap;\n overflow-x: scroll;\n overflow-y: hidden;\n display: flex;\n"]))),Ne=Y.ZP.div(we||(we=xe(["\n padding: ",";\n white-space: nowrap;\n font-size: 14px;\n display: flex;\n background-color: ",";\n border-radius: 25px;\n margin-right: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n a {\n color: ",";\n font-size: ",";\n }\n"])),(e=>{let{isMobile:t}=e;return t?"4px 16px":"10px 32px"}),(e=>{let{color:t}=e;return"rgba(".concat(t,", 0.1)")}),(e=>{var t;let{gap:n}=e;return null!==(t=n+"px")&&void 0!==t?t:"10px"}),(e=>{let{color:t}=e;return"rgba(".concat(t,",1)")}),(e=>{let{isMobile:t}=e;return t?"14px":"20px"})),Ie=(0,Y.ZP)(A.Z)(Ee||(Ee=xe(["\n fill: ",";\n width: ",";\n height: ",";\n display: block;\n margin-right: ",";\n"])),(e=>{let{color:t}=e;return null!=t?t:"none"}),(e=>{let{isMobile:t}=e;return t?"20px":"30px"}),(e=>{let{isMobile:t}=e;return t?"20px":"30px"}),(e=>{let{isMobile:t}=e;return t?"4px":"10px"})),Re=(0,r.memo)((()=>{const e=(0,v.d)();return r.createElement(_e.Z,{gradient:!1,pauseOnHover:!0,play:!0},r.createElement(Me,null,r.createElement(Ne,{color:"81, 156, 255",gap:32,isMobile:e},r.createElement(Ie,{name:"twitter",color:"#519CFF",isMobile:e}),r.createElement("a",{href:"https://twitter.com/Zypher_Games",target:"_blank",rel:"noreferrer"},"Follow us on Twitter")),r.createElement(Ne,{color:"126, 232, 126",gap:32,isMobile:e},r.createElement(Ie,{name:"parachute",color:"#7EE87E",isMobile:e}),r.createElement("a",{href:"https://medium.com/@ZypherGames/upcoming-announcement-44e69204adb1",target:"_blank",rel:"noreferrer"},"The daily login airdrop is here!")),r.createElement(Ne,{color:"111, 229, 255",gap:32,isMobile:e},r.createElement(Ie,{name:"discord",color:"#6FE5FF",isMobile:e}),r.createElement("a",{href:"https://discord.com/invite/MKJZhS4p2T",target:"_blank",rel:"noreferrer"},"Join our Community and Explore the Game together"))))})),Ce="index_home__HJOfb",Ge="index_content__VV+Jk",Ae="index_top__nkEEv",Oe="index_footer__KIgGU",Pe=()=>{const{account:e}=(0,g.a)(),[t,n]=(0,u.FV)(P.Wg),a=(0,h.h)(),[i,s]=(0,u.FV)(P.rY),[d,c]=(0,r.useState)(!1),{list:N,hasError:I}=(0,r.useMemo)((()=>a),[a]);(0,r.useEffect)((()=>{if(N&&N.size){let e=[];Array.from(N.entries()).forEach((t=>{let[,n]=t;e=e.concat(n)})),s(e)}}),[null==N?void 0:N.size]);const R=(0,w.U)();(0,r.useEffect)((()=>{i.length?c(!1):c(!0)}),[i.length]);const C=(0,r.useCallback)((()=>{R&&(0,E.Z)({contractFun:m.ZP,contracts:{contractName:y.iJ.Lobby,method:"summary",account:e,params:[]},defaultValue:[new(l())("0"),new(l())("0")]}).then((async t=>{const a=_(t,0),i=_(t,1),r=await(0,E.b)({contractName:y.iJ.Points,defaultValue:new(l())("0")}),s=x(r,!0,R),u=await(0,E.Z)({contractFun:f.Z,contracts:{contractName:y.iJ.ZypherGameToken,method:"totalSupply",account:e,params:[]},defaultValue:new(l())("0")}),p=x(u),m=await(0,E.Z)({contractFun:b,contracts:{contractName:y.iJ.ZypherGameToken,method:"getResidue",account:e,params:[]},defaultValue:new(l())("0")}),d=x(m),c=await(0,E.Z)({contractFun:b,contracts:{contractName:y.iJ.ZypherGameToken,method:"getRepay",account:e,params:[]},defaultValue:new(l())("0")}),g=x(c);n({totalVault:(0,M.lb)(Number(o.formatEther(s)),2),totalPoint:(0,M.lb)(Number(o.formatEther(p)),0),totalGame:(0,M.lb)(new(l())(a).toNumber()),totalPlayers:(0,M.lb)(new(l())(i).toNumber()),totalDebtObligation:(0,M.lb)(new(l())(o.formatEther(d)).toNumber()),totalGpBurned:(0,M.lb)(new(l())(o.formatEther(g)).toNumber()),total:{[te.totalGame]:Object.fromEntries(t.map((e=>[e.chainId,new(l())(e.response[0]).toString()]))),[te.totalPlayers]:Object.fromEntries(t.map((e=>[e.chainId,new(l())(e.response[1]).toString()]))),[te.totalVault]:Object.fromEntries(r.map((e=>[e.chainId,(0,M.lb)(Number(o.formatEther(new(l())(e.response.toString()).toString())),3)]))),[te.totalPoint]:Object.fromEntries(u.map((e=>[e.chainId,(0,M.lb)(Number(o.formatEther(new(l())(e.response.toString()).toString())))]))),[te.totalDebtObligation]:Object.fromEntries(m.map((e=>[e.chainId,(0,M.lb)(Number(o.formatEther(new(l())(e.response.toString()).toString())))]))),[te.totalGpBurned]:Object.fromEntries(c.map((e=>[e.chainId,(0,M.lb)(Number(o.formatEther(new(l())(e.response.toString()).toString())))])))}})})).catch((e=>{console.error("An error occurred:",e)}))}),[e,R]),G=(0,u.sJ)(p.DM);(0,T.Z)(C,8e3),(0,r.useEffect)(C,[G]);const A=(0,v.d)(),B=(0,O.b0)();return r.createElement("div",{className:Ce},r.createElement("div",{className:Ae},r.createElement(Re,null)),r.createElement("div",{className:Ge},r.createElement(ie,B),r.createElement(ce,{data:t}),r.createElement(he,{isMobile:A}),r.createElement("div",{className:Oe},"Copyright © 2023 Zypher Games. All rights reserved.")))},Be=(0,r.memo)((()=>r.createElement(Pe,null)),i())},89082:(e,t,n)=>{"use strict";n.d(t,{io:()=>r,Wg:()=>s,rY:()=>l});var a=n(2804),i=n(59314);const r=(0,a.cn)({key:"videoDialog",default:!1}),s=(0,a.cn)({key:"homeDateState",default:{totalVault:"0",totalPoint:"0",totalGame:"0",totalPlayers:"0",totalDebtObligation:"0",totalGpBurned:"0",total:{}},effects_UNSTABLE:[(0,i.Nh)("homeDateState")]}),l=(0,a.cn)({key:"gameListChainListState2",default:[]})},74001:(e,t,n)=>{"use strict";n.d(t,{b:()=>l,Z:()=>o});var a=n(95534),i=n.n(a),r=n(47631),s=n(6087);async function l(e){let{contractName:t,defaultValue:n}=e;const a=r.KC.filter((e=>e!==r.a_.Arbitrum)).map((async e=>{try{const n=(0,r.Cf)(e,t),a=await(0,s.VH)(i()(r.Vl[e]));return{contractAddress:n,method:"getBalance",chainId:e,response:await a.getBalance(n)}}catch(t){return{contractAddress:void 0,method:"getBalance",chainId:e,response:n}}}));return Promise.all(a)}async function o(e){let{contractFun:t,contracts:n,defaultValue:a}=e;await function(e){const t=+new Date;let n;return new Promise(((a,i)=>{n=setInterval((()=>{t+1e3*e<+new Date&&(clearInterval(n),a(!0))}),10)}))}(1);const i=r.KC.filter((e=>e!==r.a_.Arbitrum)).map((async e=>{try{const a=(0,r.Cf)(e,n.contractName),i=await t(e,a);let s;"function"==typeof n.params?s=n.params(e):Array.isArray(n.params)&&(s=n.params);const l=await i.read[n.method](s);return{method:n.method,chainId:e,response:l}}catch(t){if("getResidue"===n.method){const a=(0,r.Cf)(e,n.contractName);console.error("batchRequestContracts: ",a,e,n.contractName,t)}return{method:n.method,chainId:e,response:a}}}));return Promise.all(i)}},62882:(e,t,n)=>{"use strict";n.d(t,{O:()=>p});var a=n(44431),i=n.n(a),r=n(47631),s=n(49786),l=n(33030),o=n(88017);const u={[r.a_.Mainnet]:"BNB",[r.a_.Testnet]:"BT",[r.a_.Arbitrum]:"AO",[r.a_.ArbitrumGoerli]:"AGT",[r.a_.ArbitrumRinkeby]:"ARBR",[r.a_.ThunderCore]:"TT",[r.a_.ThunderCoreTestnet]:"TST",[r.a_.FindoraTest]:"GT",[r.a_.LineaTestnet]:"LT",[r.a_.LineaMainnet]:"LM",[r.a_.POLYGON_MUMBAI]:"PM",[r.a_.POLYGON_ZKEVM]:"PZT",[r.a_.OPBNB]:"OB",[r.a_.ScrollSepoliaTestnet]:"SST",[r.a_.ScrollAlphaTestnet]:"SAT",[r.a_.OPBNBTEST]:"OBT"},p=e=>{let{chainId:t,game:n,gameIdInfo:a}=e;const{status:r,gameId:p,players:m,winner:d,cardNumbers:y,selectedNumbers:c}=n,[b,f,g,,T,,h]=a;try{const e=r;let n="".concat(m.length," players"),b=new(i())(g).dividedBy(m.length).toString();b="0"===b?"5000":b;let f="-",h="-";if(e===s._.End){n=d;const e=new(i())(T);f=(0,o.lb)(Number(T)),h=(0,o.lb)(e.dividedBy(new(i())(b)).toNumber())}return b=(0,o.lb)(Number(b),0),{chainId:t,status:e,startTime:(0,l.xz)(a[0]),startTimeMobile:(0,l._X)(a[0]),game:s.W.zBingo,winner:d,players:m.map((e=>{let{cardId:t,isAbandoned:n,user:a}=e;return{user:a,cardId:t.toString(),isAbandoned:n}})),roomID:p.toString(),roomIDStr:(t?u[t]:"")+"B#"+p.toString(),bingoInfo:{cardNumbers:y,selectedNumbers:c},gameIdInfo:a,inputPerPlayer:b,multiplier:h,win:f,winnerOrPlayers:n}}catch(e){return void console.error("formatGames: ",e)}}},97005:(e,t,n)=>{var a=n(67294);function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(a);!function(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}('.marquee-container {\n overflow-x: hidden !important;\n display: flex !important;\n flex-direction: row !important;\n position: relative;\n width: var(--width);\n transform: var(--transform);\n}\n.marquee-container:hover div {\n animation-play-state: var(--pause-on-hover);\n}\n.marquee-container:active div {\n animation-play-state: var(--pause-on-click);\n}\n\n.overlay {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.overlay::before, .overlay::after {\n background: linear-gradient(to right, var(--gradient-color));\n content: "";\n height: 100%;\n position: absolute;\n width: var(--gradient-width);\n z-index: 2;\n}\n.overlay::after {\n right: 0;\n top: 0;\n transform: rotateZ(180deg);\n}\n.overlay::before {\n left: 0;\n top: 0;\n}\n\n.marquee {\n flex: 0 0 auto;\n min-width: var(--min-width);\n z-index: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n animation: scroll var(--duration) linear var(--delay) var(--iteration-count);\n animation-play-state: var(--play);\n animation-delay: var(--delay);\n animation-direction: var(--direction);\n}\n@keyframes scroll {\n 0% {\n transform: translateX(0%);\n }\n 100% {\n transform: translateX(-100%);\n }\n}\n\n.initial-child-container {\n flex: 0 0 auto;\n display: flex;\n min-width: auto;\n flex-direction: row;\n}\n\n.child {\n transform: var(--transform);\n}');const s=a.forwardRef((function({style:e={},className:t="",autoFill:n=!1,play:i=!0,pauseOnHover:s=!1,pauseOnClick:l=!1,direction:o="left",speed:u=50,delay:p=0,loop:m=0,gradient:d=!1,gradientColor:y=[255,255,255],gradientWidth:c=200,onFinish:b,onCycleComplete:f,onMount:g,children:T},h){const[v,w]=a.useState(0),[E,_]=a.useState(0),[x,M]=a.useState(1),[N,I]=a.useState(!1),R=a.useRef(null),C=h||R,G=a.useRef(null),A=a.useCallback((()=>{if(G.current&&C.current){const e=C.current.getBoundingClientRect(),t=G.current.getBoundingClientRect();let a=e.width,i=t.width;"up"!==o&&"down"!==o||(a=e.height,i=t.height),M(n&&a&&i&&i{if(N&&(A(),G.current&&C.current)){const e=new ResizeObserver((()=>A()));return e.observe(C.current),e.observe(G.current),()=>{e&&e.disconnect()}}}),[A,C,N]),a.useEffect((()=>{A()}),[A,T]),a.useEffect((()=>{I(!0)}),[]),a.useEffect((()=>{"function"==typeof g&&g()}),[]);const O=a.useMemo((()=>n?E*x/u:EObject.assign(Object.assign({},e),{"--pause-on-hover":!i||s?"paused":"running","--pause-on-click":!i||s&&!l||l?"paused":"running","--width":"up"===o||"down"===o?"100vh":"100%","--transform":"up"===o?"rotate(-90deg)":"down"===o?"rotate(90deg)":"none"})),[e,i,s,l,o]),D=a.useMemo((()=>({"--gradient-color":`${P}, 1), ${P}, 0)`,"--gradient-width":"number"==typeof c?`${c}px`:c})),[P,c]),S=a.useMemo((()=>({"--play":i?"running":"paused","--direction":"left"===o?"normal":"reverse","--duration":`${O}s`,"--delay":`${p}s`,"--iteration-count":m?`${m}`:"infinite","--min-width":n?"auto":"100%"})),[i,o,O,p,m,n]),k=a.useMemo((()=>({"--transform":"up"===o?"rotate(90deg)":"down"===o?"rotate(-90deg)":"none"})),[o]),L=a.useCallback((e=>[...Array(Number.isFinite(e)&&e>=0?e:0)].map(((e,t)=>r.default.createElement(a.Fragment,{key:t},a.Children.map(T,(e=>r.default.createElement("div",{style:k,className:"child"},e))))))),[k,T]);return N?r.default.createElement("div",{ref:C,style:B,className:"marquee-container "+t},d&&r.default.createElement("div",{style:D,className:"overlay"}),r.default.createElement("div",{className:"marquee",style:S,onAnimationIteration:f,onAnimationEnd:b},r.default.createElement("div",{className:"initial-child-container",ref:G},a.Children.map(T,(e=>r.default.createElement("div",{style:k,className:"child"},e)))),L(x-1)),r.default.createElement("div",{className:"marquee",style:S},L(x))):null}));t.Z=s},46896:()=>{},94083:()=>{},50490:e=>{"use strict";e.exports=JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint8[][]","name":"playerCardNumbers","type":"uint8[][]"}],"name":"Bingo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"isOvertime","type":"bool"}],"name":"GameHalted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":true,"internalType":"uint256","name":"cardId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"position","type":"uint8"}],"name":"GameParticipated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":false,"internalType":"address","name":"cardContract","type":"address"},{"indexed":false,"internalType":"address[]","name":"players","type":"address[]"}],"name":"GameStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"}],"name":"LineupJoined","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"}],"name":"LineupLeft","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"round","type":"uint32"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint8","name":"number","type":"uint8"}],"name":"NumberSelected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newReward","type":"address"},{"indexed":true,"internalType":"address","name":"oldReward","type":"address"}],"name":"RewardChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"GAME_REWARD_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RECENT_GAME_COUNTS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"_seasonLogs","outputs":[{"internalType":"uint256","name":"wins","type":"uint256"},{"internalType":"uint256","name":"joined","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"bytes","name":"signedGameLabel","type":"bytes"}],"name":"bingo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expectedLines","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deno","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameCard","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"getCurrentRound","outputs":[{"internalType":"uint32","name":"round","type":"uint32"},{"internalType":"address","name":"player","type":"address"},{"internalType":"uint32","name":"remain","type":"uint32"},{"internalType":"string","name":"status","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"getGameInfo","outputs":[{"internalType":"uint32","name":"startedAt","type":"uint32"},{"internalType":"uint32","name":"endedAt","type":"uint32"},{"internalType":"address","name":"winner","type":"address"},{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cardId","type":"uint256"}],"internalType":"struct IBingoRoom.Participant[]","name":"players","type":"tuple[]"},{"components":[{"internalType":"uint32","name":"round","type":"uint32"},{"internalType":"uint8","name":"number","type":"uint8"},{"internalType":"uint32","name":"timestamp","type":"uint32"},{"internalType":"address","name":"player","type":"address"}],"internalType":"struct IBingoRoom.GameRound[]","name":"rounds","type":"tuple[]"},{"internalType":"string","name":"status","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"getLatestRound","outputs":[{"components":[{"internalType":"uint32","name":"round","type":"uint32"},{"internalType":"uint8","name":"number","type":"uint8"},{"internalType":"uint32","name":"timestamp","type":"uint32"},{"internalType":"address","name":"player","type":"address"}],"internalType":"struct IBingoRoom.GameRound","name":"last","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNextKeyLabel","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"getSelectedNumbers","outputs":[{"internalType":"uint8[]","name":"numbers","type":"uint8[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gameCard","type":"address"},{"internalType":"uint8","name":"_expectedLines","type":"uint8"},{"internalType":"uint8","name":"_minPlayers","type":"uint8"},{"internalType":"uint8","name":"_maxPlayers","type":"uint8"},{"internalType":"uint8","name":"minCardNumber","type":"uint8"},{"internalType":"uint8","name":"maxCardNumber","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"zkCard","type":"bytes"}],"name":"join","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"leave","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lineupUsers","outputs":[{"internalType":"address[]","name":"list","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPlayers","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPlayers","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"title","type":"string"}],"name":"newSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"skip","type":"uint256"}],"name":"playedGames","outputs":[{"components":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"string","name":"status","type":"string"},{"internalType":"address","name":"winner","type":"address"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"uint8[]","name":"selectedNumbers","type":"uint8[]"},{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cardId","type":"uint256"}],"internalType":"struct IBingoRoom.Participant[]","name":"players","type":"tuple[]"}],"internalType":"struct IBingoRoom.RecentGame[]","name":"games","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum IBingoRoom.RecentGameFilter","name":"filter","type":"uint8"}],"name":"recentGames","outputs":[{"components":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"string","name":"status","type":"string"},{"internalType":"address","name":"winner","type":"address"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"uint8[]","name":"selectedNumbers","type":"uint8[]"},{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cardId","type":"uint256"}],"internalType":"struct IBingoRoom.Participant[]","name":"players","type":"tuple[]"}],"internalType":"struct IBingoRoom.RecentGame[]","name":"games","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"bytes","name":"signedGameLabel","type":"bytes"}],"name":"restoreGame","outputs":[{"internalType":"uint256","name":"playingGameId","type":"uint256"},{"internalType":"uint32","name":"autoEndTime","type":"uint32"},{"internalType":"bool","name":"isCardContentMatched","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint8","name":"number","type":"uint8"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"bytes","name":"signedGameLabel","type":"bytes"}],"name":"selectAndBingo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint8","name":"number","type":"uint8"}],"name":"selectNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"startTimeout","type":"uint32"},{"internalType":"uint8","name":"boostRounds","type":"uint8"},{"internalType":"uint32","name":"roundGap","type":"uint32"},{"internalType":"uint32","name":"roundTimeout","type":"uint32"},{"internalType":"uint32","name":"maxDuration","type":"uint32"}],"name":"setGameTimers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newReward","type":"address"},{"internalType":"uint32","name":"amount","type":"uint32"}],"name":"setReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"summary","outputs":[{"internalType":"uint256","name":"totalGameStarted","type":"uint256"},{"internalType":"uint256","name":"totalPlayersJoined","type":"uint256"},{"internalType":"uint256","name":"totalRewardDistributed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timer","outputs":[{"components":[{"internalType":"uint32","name":"startTimeout","type":"uint32"},{"internalType":"uint8","name":"boostRounds","type":"uint8"},{"internalType":"uint32","name":"roundGap","type":"uint32"},{"internalType":"uint32","name":"roundTimeout","type":"uint32"},{"internalType":"uint32","name":"maxDuration","type":"uint32"}],"internalType":"struct BingoGameRoom.GameTimeout","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userRecords","outputs":[{"components":[{"internalType":"uint256","name":"wins","type":"uint256"},{"internalType":"uint256","name":"joined","type":"uint256"}],"internalType":"struct IUserCenter.PlayerStatistics","name":"current","type":"tuple"},{"components":[{"internalType":"uint256","name":"wins","type":"uint256"},{"internalType":"uint256","name":"joined","type":"uint256"}],"internalType":"struct IUserCenter.PlayerStatistics","name":"overall","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"}]')}}]); \ No newline at end of file +(self.webpackChunkbingo_frontend=self.webpackChunkbingo_frontend||[]).push([[3571],{1827:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(74942),i=n(67294),r=n(2804),s=n(89082);const l=n.p+"55fc1028991d40506e2e7011ce0dc5e2.mp4";function o(e){let{}=e;const t=(0,i.useRef)(null),n=(0,r.sJ)(s.io),o=(0,r.Zl)(s.io);return i.createElement(i.Fragment,null,i.createElement(a.t9,{isOpen:n,onDismiss:()=>{t.current.pause(),o(!1)}},i.createElement(a.cZ,{style:{background:"#000",padding:"0",width:"1200px"}},i.createElement("video",{controls:!0,width:"100%",ref:t},i.createElement("source",{src:l,type:"video/mp4"})))))}},6087:(e,t,n)=>{"use strict";n.d(t,{VH:()=>l});var a=n(71210),i=n(9163);n(47631);let r;const s=async()=>{if(window.ethereum)return new a.Q(window.ethereum);if(window.web3)return new a.Q(window.web3.currentProvider);throw new Error("can't find default provider")},l=e=>new Promise((async(t,n)=>{if(e)t(new i.r(e));else if(r)t(r);else{const e=await s();e?(r=e,t(e)):n("can't find default provider")}}));window.addEventListener("load",(async()=>{s()}))},43733:(e,t,n)=>{"use strict";n.d(t,{id:()=>s,ZP:()=>l});var a=n(50490),i=n(47631),r=n(5975);n(59619),n(63829);const s=e=>{let{address:t,library:n,account:i}=e;return(0,r.xi)({address:t,abi:a,library:n,account:i})};const l=(e,t,n)=>(0,r.uN)({abi:a,address:null!=t?t:(0,i.$y)(e,i.iJ.Lobby),signer:n,chainId:e})},2039:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(95534),i=n.n(a),r=n(63677),s=n(6087),l=n(47631);const o=async e=>{try{const t=null!=e?e:await(async()=>{const e=await(0,s.VH)(),t=await e.getNetwork();if(!Object.values(l.a_).includes(t.chainId))throw new Error("Network not supported");return t.chainId})(),n=await(0,s.VH)(i()(l.Vl[t]));return new r.m({ethersProvider:n,tryAggregate:!1,multicallCustomContractAddress:l.QO[t].multicall})}catch(e){return void console.error("Getting multicall failure:",e)}}},61664:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(67294);function i(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=(0,a.useRef)();(0,a.useEffect)((()=>{i.current=e}),[e]),(0,a.useEffect)((()=>{function e(){const e=i.current;e&&e()}if(null!==t){n&&e();const a=setInterval(e,t);return()=>clearInterval(a)}}),[t,n])}},29562:(e,t,n)=>{"use strict";n.d(t,{h:()=>d,G:()=>y});var a=n(50490),i=n(44431),r=n.n(i),s=n(67294),l=n(47631),o=n(43733),u=n(2039),p=n(74001),m=n(62882);n(80941),n(88017);const d=()=>{const[e,t]=(0,s.useState)(),[n,a]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{(0,p.Z)({contractFun:o.ZP,contracts:{contractName:l.iJ.Lobby,method:"recentGames",params:["0"]},defaultValue:null}).then((async e=>{try{const n=new Map;for(let a=0;ae.gameId.toString())),{gameInfo:l}=await y({chainId:i,gameIdList:s})||{};if(l){const e=r.map(((e,t)=>(0,m.O)({chainId:i,game:e,gameIdInfo:l[t]})));n.set(i,e)}n.size&&t(n)}}catch(e){a(!0)}}))}),[]),{list:e,hasError:n}},y=async e=>{let{chainId:t,gameIdList:n}=e;try{const e=(0,l.$y)(t,l.iJ.Lobby),i=n.map((t=>({reference:l.iJ.Lobby+t,contractAddress:e,abi:a,calls:[{methodName:"getGameInfo",reference:"getGameInfo",methodParameters:[t]}]}))),s=await(0,u.Z)(t);if(s){const{results:e}=await s.call(i);if(e){return{gameInfo:Object.values(e).map((e=>{const t=e.callsReturnContext[0].returnValues;return[t[0],t[1],new(r())(t[2].hex).dividedBy(l.$d).toString(),t[3],new(r())(t[4].hex).dividedBy(l.$d).toString(),t[5],t[6],t[7]]}))}}}}catch(e){console.error("getGameInfo err: ",e)}}},8219:(e,t,n)=>{"use strict";n.d(t,{i:()=>u,e:()=>o});var a=n(94184),i=n.n(a),r=n(67294);const s="widget_title__E8aNg",l="widget_list__0eYOt",o=(0,r.memo)((e=>{let{label:t}=e;return r.createElement("h3",{className:s},t)})),u=(0,r.memo)((e=>{let{className:t,children:n}=e;return r.createElement("div",{className:i()(l,t)},n)}))},4049:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Be});var a=n(18446),i=n.n(a),r=n(67294),s=n(44431),l=n.n(s),o=n(46474),u=n(2804),p=n(21449),m=n(43733);const d=JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRepay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getResidue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"debt_","type":"uint256"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"repayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]');var y=n(47631),c=n(5975);const b=(e,t,n)=>(0,c.uN)({abi:d,address:null!=t?t:(0,y.$y)(e,y.iJ.ZypherGameToken),signer:n,chainId:e});var f=n(10271),g=n(59619),T=n(61664),h=n(29562),v=n(9120),w=n(95362),E=n(74001);const _=(e,t)=>e.reduce(((e,n)=>new(l())(n.response[t]).plus(new(l())(e)).toString()),0),x=(e,t,n)=>e.reduce(((e,a)=>{let i=new(l())(1);t&&n&&(i=new(l())(n[y.F[a.chainId]]));return new(l())(a.response.toString()).times(i).plus(new(l())(e)).toString()}),"0");var M=n(88017),N=n(7085),I=n(94184),R=n.n(I),C=n(79655),G=n(1827),A=n(80652),O=n(20825),P=n(89082),B=n(59314);const D=(0,u.cn)({key:"dailyRewardsRuleDialog",default:!1,effects_UNSTABLE:[(0,B.Nh)("dailyRewardsRuleDialog")]}),S={header:"banner_header__Okx8j",headerFl:"banner_headerFl__UAbjr",headerFr:"banner_headerFr__KuVjm",banner:"banner_banner__Q6u1g",bannerbg:"banner_bannerbg__SJvR+",bannerInner:"banner_bannerInner__LblfL",bannerFlInnerImg:"banner_bannerFlInnerImg__VoKj7",bannerFlBtnWrap:"banner_bannerFlBtnWrap__mPQtQ",bannerFlBtn:"banner_bannerFlBtn__VrxZn",gameRuleBtnImg:"banner_gameRuleBtnImg__lD2Un",headerFrInner:"banner_headerFrInner__eBXcD",h23:"banner_h23__N8sGi",h22:"banner_h22__mAx37",h21:"banner_h21__mWVCf",flex:"banner_flex__Zf2ee",headerFrInnerBg:"banner_headerFrInnerBg__y2uro",btn:"banner_btn__9aiLm",btnLoading:"banner_btnLoading__ASkm9",btnClaimed:"banner_btnClaimed__ciL3A",data:"banner_data__u0ddC",dataMain:"banner_dataMain__zAdC8",item:"banner_item__iAxoF",dataImg:"banner_dataImg__4Odtt",itemDetail:"banner_itemDetail__qNbOv",tit:"banner_tit__LPzBj",mun:"banner_mun__BTPzt",tooltip:"banner_tooltip__s6UwQ"};n(1025);var k=n(65400),L=n(54549),Z=n(74942);const F={dialogContent:"DailyRewardsRuleDialog_dialogContent__qqbV2",cursor:"DailyRewardsRuleDialog_cursor__II0OJ",dialogHeader:"DailyRewardsRuleDialog_dialogHeader__b2JIY",dialogContainer:"DailyRewardsRuleDialog_dialogContainer__yxHFf",btnWrap:"DailyRewardsRuleDialog_btnWrap__TBOZ4",btn:"DailyRewardsRuleDialog_btn__76dqo"},V=()=>{const e=(0,u.sJ)(D),t=(0,u.Zl)(D),n=(0,r.useCallback)((()=>{t(!1)}),[]);return r.createElement(r.Fragment,null,r.createElement(Z.t9,{isOpen:e,onDismiss:n},r.createElement(Z.cZ,{className:F.dialogContent},r.createElement("div",{className:F.dialogHeader},r.createElement("h3",null,"Rules"),r.createElement("div",{className:F.cursor,onClick:n},r.createElement(L.Z,null))),r.createElement("div",{className:F.dialogContainer},r.createElement("h4",null,"Daily Login Rewards: A Web3 Adventure Awaits!"),r.createElement("p",null,"Embark on the zBingo journey as we mark our V1 Grand Launch! With the Zypher gaming realm expanding, we're thrilled to enrich your experience with daily rewards."," ",r.createElement("a",{href:"https://medium.com/@ZypherGames/upcoming-announcement-44e69204adb1",target:"_blank",rel:"noreferrer"},"More Details")),r.createElement("h4",null,"📆 Event Duration: ",r.createElement("p",null,"9/26 2AM UTC - 10/10 2AM UTC")),r.createElement("h4",null," 🏆 Reward Mechanics:"),r.createElement("p",null,r.createElement("em",null),r.createElement("i",null,"Step into zBingo daily and pocket an electrifying 5,000 $GP (Gold Points)."),r.createElement("br",null),r.createElement("em",null),r.createElement("i",null,"Each unique address can claim the rewards once every 24 hours on each supported network."),r.createElement("br",null),r.createElement("em",null),r.createElement("i",null,"For our early adventurers, there's no ceiling! No initial cap on the number of participating wallets.")),r.createElement("h4",null,"Interpretation & Guidelines: "),r.createElement("p",null,"The project team reserves the right to interpret and determine the terms and conditions of the Daily Login Rewards event. If you have any questions please reach out to us on"," ",r.createElement("a",{href:"https://discord.com/invite/MKJZhS4p2T",target:"_blank",className:F.fontWhite,rel:"noreferrer"},"Discord")," ","of hello@zypher.game.")),r.createElement("div",{className:F.btnWrap},r.createElement(k.default,{className:F.btn,onClick:n},"Ok")))))};var j=n(1413);const z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};var U=n(6445),K=function(e,t){return r.createElement(U.Z,(0,j.Z)((0,j.Z)({},e),{},{ref:t,icon:z}))};K.displayName="ArrowRightOutlined";const J=r.forwardRef(K);var W,$,q=n(89250),Y=n(29163);function H(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Q=Y.ZP.div(W||(W=H(["\n border-radius: 50px;\n background: rgba(101, 237, 188, 0.1);\n padding: ",";\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n margin-top: ",";\n margin-bottom: ",";\n color: #65edbc;\n font-family: Poppins;\n font-weight: 400;\n font-size: ",";\n cursor: pointer;\n p {\n padding: ",";\n margin: 0;\n strong {\n font-weight: 600;\n }\n }\n img {\n position: absolute;\n top: 30%;\n transform: translateY(-50%);\n left: 50px;\n width: 160px;\n height: 160px;\n\n @media (max-width: 768px) {\n top: 30%;\n left: 4px;\n width: 58px;\n height: 58px;\n transform: translateY(-50%);\n }\n }\n"])),(e=>{let{isMobile:t}=e;return t?"0 20px":"0 50px"}),(e=>{let{isMobile:t}=e;return t?"28px":"100px"}),(e=>{let{isMobile:t}=e;return t?"12px":"64px"}),(e=>{let{isMobile:t}=e;return t?"12px":"22px"}),(e=>{let{isMobile:t}=e;return t?"10px 0 10px 50px":"33px 0 33px 200px"})),X=Y.ZP.div($||($=H(["\n padding: ",";\n color: #65edbc;\n background: rgba(101, 237, 188, 0.1);\n border: 1px solid #65edbc;\n border-radius: 28px;\n font-size: ",";\n margin-left: 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n white-space: nowrap;\n gap: 10px;\n"])),(e=>{let{isMobile:t}=e;return t?"4px 10px":"12px 20px"}),(e=>{let{isMobile:t}=e;return t?"12px":"16px"})),ee=(0,r.memo)((e=>{let{isMobile:t}=e;const n=(0,q.s0)(),a=(0,r.useCallback)((()=>{window.open("https://medium.com/@ZypherGames/upcoming-announcement-44e69204adb1","_blank")}),[n]);return r.createElement(Q,{onClick:a,isMobile:t},r.createElement("img",{src:"/img/home/Invitation_box.png"}),r.createElement("p",null,r.createElement("strong",null,"Launch Special: Top Up Now for Limited-Time Extra GP Airdrops!")),t?null:r.createElement(X,{isMobile:t},"Go ",r.createElement(J,null)))}));let te;!function(e){e.totalVault="totalVault",e.totalPoint="totalPoint",e.totalGame="totalGame",e.totalPlayers="totalPlayers",e.totalDebtObligation="totalDebtObligation",e.totalGpBurned="totalGpBurned"}(te||(te={}));const ne=(0,r.memo)((e=>{let{pointsStr:t,dayClaimed:n,claimHandle:a,isClaimLoading:i,claimConfKey:s}=e;const l=(0,u.Zl)(P.io),o=(0,u.Zl)(D),p=(0,v.d)(),m=(0,r.useMemo)((()=>{const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),8,26,2,0,0)),n=new Date(Date.UTC(e.getUTCFullYear(),9,10,2,0,0));return!(e>n)&&tl(!0),src:"/img/home/gameRule.png",alt:"gameRule",className:S.gameRuleBtnImg}),r.createElement(G.Z,null)))))),r.createElement("div",{className:S.headerFr},r.createElement("img",{src:"/img/home/banner02bg.png",alt:"points",className:S.bannerbg}),r.createElement("div",{className:S.headerFrInner},s&&s===O.cW.princely?r.createElement("h2",{className:S.h21},"DEAR GENESIS PLAYER",r.createElement("br",null)," DAILY REWARDS"):r.createElement(r.Fragment,null,r.createElement("h2",{className:S.h23,onClick:()=>o(!0)},"DAILY REWARDS (",r.createElement("i",null,"9/26 - 10/10"),")",r.createElement(A.Z,{name:"question_bg",className:S.question}),r.createElement(V,null)),r.createElement("h2",{className:S.h22},"LOG IN DAILY TO GET ",r.createElement("br",null),r.createElement("i",null,t)," $GP")),r.createElement(ae,{claimConfKey:s},n?r.createElement("p",{className:R()(S.btn,S.btnClaimed)},"CLAIMED"):m?r.createElement("div",{className:i?R()(S.btn,S.btnLoading):S.btn,onClick:a},"CLAIM",i&&r.createElement(N.Z,null)):r.createElement("p",{className:R()(S.btn,S.btnClaimed)},"CLAIM"))))),r.createElement(ee,{isMobile:p}))}),i()),ae=(0,r.memo)((e=>{let{className:t,claimConfKey:n,children:a}=e;return n&&n===O.cW.princely?r.createElement("div",{className:t}," ",a):r.createElement(r.Fragment,null,a)}),i()),ie=ne;n(15086);var re,se=n(94055),le=(n(54277),n(74048)),oe=n(8219);const ue=Y.ZP.div(re||(pe=["\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding: 3px 0;\n"],me||(me=pe.slice(0)),re=Object.freeze(Object.defineProperties(pe,{raw:{value:Object.freeze(me)}}))));var pe,me;const de=(0,r.memo)((e=>{let{total:t,className:n,dataKey:a,children:i}=e;try{return r.createElement(se.default,{overlayClassName:"datatooltip",title:r.createElement(le.default,{className:n,direction:"vertical",split:r.createElement(ue,null)},y.KC.map((e=>t[a][e]?r.createElement(ye,{key:e,chainId:e,dataKey:a,total:t}):null)))},i)}catch(e){return r.createElement(r.Fragment,null,i)}}),i()),ye=(0,r.memo)((e=>{var t;let{chainId:n,total:a,dataKey:i}=e;const s=(0,r.useMemo)((()=>{if(i===te.totalVault)return y.F[n];if(i===te.totalGame);else{if(i===te.totalPlayers)return"";if(i===te.totalPoint||i===te.totalDebtObligation||i===te.totalGpBurned)return"GP"}return""}),[]);return r.createElement(le.default,null,r.createElement("img",{src:y.Tf[n],alt:"",width:20}),null!==(t=a[i][n])&&void 0!==t?t:"",s)}),i()),ce=(0,r.memo)((e=>{let{data:t}=e;return r.createElement(oe.i,{className:S.data},r.createElement(oe.e,{label:"Data"}),r.createElement("div",{className:S.dataMain},[{title:"Value",value:"totalVault",dataKey:te.totalVault},{title:"Gold Points",img:"points",value:"totalPoint",dataKey:te.totalPoint},{title:"Games",value:"totalGame",dataKey:te.totalGame},{title:"Players",value:"totalPlayers",dataKey:te.totalPlayers},{title:"Debt Obligation",value:"totalDebtObligation",dataKey:te.totalDebtObligation},{title:"$GP Burned",value:"totalGpBurned",dataKey:te.totalGpBurned}].map((e=>{var n;return r.createElement("div",{className:S.item,key:e.title},r.createElement(de,{dataKey:e.dataKey,total:t.total,className:S.tooltip},r.createElement("img",{src:"/img/home/data_".concat(null!==(n=e.img)&&void 0!==n?n:e.title.toLowerCase(),".svg"),alt:"",className:S.dataImg}),r.createElement("div",{className:S.itemDetail},r.createElement("div",{className:S.tit},e.title),r.createElement("div",{className:S.mun},e.dataKey===te.totalVault?"$":"",t[e.value]))))}))))}),i()),be="games_games__GVWym",fe="games_main__Y0bTJ",ge="games_tit__kAdkf",Te="games_txt__YLmrR",he=(0,r.memo)((e=>{let{isMobile:t}=e;return r.createElement("div",{className:be},t?null:r.createElement(oe.e,{label:"Zypher Games"}),r.createElement("div",{className:fe},r.createElement("div",{className:ge},"Zypher Games"),r.createElement("div",{className:Te},"Zypher Games is an innovative on-chain gaming platform that provides a decentralized and provably fair gaming experience by harnessing the power of Zero-Knowledge Proofs (ZKPs) and Artificial Intelligence. It creates engaging and immersive fully on-chain games that showcase the transformative potential of combining blockchain and AI technology.")))}));var ve,we,Ee,_e=n(97005);function xe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Me=Y.ZP.div(ve||(ve=xe(["\n text-align: center;\n white-space: nowrap;\n overflow-x: scroll;\n overflow-y: hidden;\n display: flex;\n"]))),Ne=Y.ZP.div(we||(we=xe(["\n padding: ",";\n white-space: nowrap;\n font-size: 14px;\n display: flex;\n background-color: ",";\n border-radius: 25px;\n margin-right: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n a {\n color: ",";\n font-size: ",";\n }\n"])),(e=>{let{isMobile:t}=e;return t?"4px 16px":"10px 32px"}),(e=>{let{color:t}=e;return"rgba(".concat(t,", 0.1)")}),(e=>{var t;let{gap:n}=e;return null!==(t=n+"px")&&void 0!==t?t:"10px"}),(e=>{let{color:t}=e;return"rgba(".concat(t,",1)")}),(e=>{let{isMobile:t}=e;return t?"14px":"20px"})),Ie=(0,Y.ZP)(A.Z)(Ee||(Ee=xe(["\n fill: ",";\n width: ",";\n height: ",";\n display: block;\n margin-right: ",";\n"])),(e=>{let{color:t}=e;return null!=t?t:"none"}),(e=>{let{isMobile:t}=e;return t?"20px":"30px"}),(e=>{let{isMobile:t}=e;return t?"20px":"30px"}),(e=>{let{isMobile:t}=e;return t?"4px":"10px"})),Re=(0,r.memo)((()=>{const e=(0,v.d)();return r.createElement(_e.Z,{gradient:!1,pauseOnHover:!0,play:!0},r.createElement(Me,null,r.createElement(Ne,{color:"81, 156, 255",gap:32,isMobile:e},r.createElement(Ie,{name:"twitter",color:"#519CFF",isMobile:e}),r.createElement("a",{href:"https://twitter.com/Zypher_Games",target:"_blank",rel:"noreferrer"},"Follow us on Twitter")),r.createElement(Ne,{color:"126, 232, 126",gap:32,isMobile:e},r.createElement(Ie,{name:"parachute",color:"#7EE87E",isMobile:e}),r.createElement("a",{href:"https://medium.com/@ZypherGames/upcoming-announcement-44e69204adb1",target:"_blank",rel:"noreferrer"},"The daily login airdrop is here!")),r.createElement(Ne,{color:"111, 229, 255",gap:32,isMobile:e},r.createElement(Ie,{name:"discord",color:"#6FE5FF",isMobile:e}),r.createElement("a",{href:"https://discord.com/invite/MKJZhS4p2T",target:"_blank",rel:"noreferrer"},"Join our Community and Explore the Game together"))))})),Ce="index_home__HJOfb",Ge="index_content__VV+Jk",Ae="index_top__nkEEv",Oe="index_footer__KIgGU",Pe=()=>{const{account:e}=(0,g.a)(),[t,n]=(0,u.FV)(P.Wg),a=(0,h.h)(),[i,s]=(0,u.FV)(P.rY),[d,c]=(0,r.useState)(!1),{list:N,hasError:I}=(0,r.useMemo)((()=>a),[a]);(0,r.useEffect)((()=>{if(N&&N.size){let e=[];Array.from(N.entries()).forEach((t=>{let[,n]=t;e=e.concat(n)})),s(e)}}),[null==N?void 0:N.size]);const R=(0,w.U)();(0,r.useEffect)((()=>{i.length?c(!1):c(!0)}),[i.length]);const C=(0,r.useCallback)((()=>{R&&(0,E.Z)({contractFun:m.ZP,contracts:{contractName:y.iJ.Lobby,method:"summary",account:e,params:[]},defaultValue:[new(l())("0"),new(l())("0")]}).then((async t=>{const a=_(t,0),i=_(t,1),r=await(0,E.b)({contractName:y.iJ.Points,defaultValue:new(l())("0")}),s=x(r,!0,R),u=await(0,E.Z)({contractFun:f.Z,contracts:{contractName:y.iJ.ZypherGameToken,method:"totalSupply",account:e,params:[]},defaultValue:new(l())("0")}),p=x(u),m=await(0,E.Z)({contractFun:b,contracts:{contractName:y.iJ.ZypherGameToken,method:"getResidue",account:e,params:[]},defaultValue:new(l())("0")}),d=x(m),c=await(0,E.Z)({contractFun:b,contracts:{contractName:y.iJ.ZypherGameToken,method:"getRepay",account:e,params:[]},defaultValue:new(l())("0")}),g=x(c);n({totalVault:(0,M.lb)(Number(o.formatEther(s)),2),totalPoint:(0,M.lb)(Number(o.formatEther(p)),0),totalGame:(0,M.lb)(new(l())(a).toNumber(),0),totalPlayers:(0,M.lb)(new(l())(i).toNumber(),0),totalDebtObligation:(0,M.lb)(new(l())(o.formatEther(d)).toNumber()),totalGpBurned:(0,M.lb)(new(l())(o.formatEther(g)).toNumber()),total:{[te.totalGame]:Object.fromEntries(t.map((e=>[e.chainId,new(l())(e.response[0]).toString()]))),[te.totalPlayers]:Object.fromEntries(t.map((e=>[e.chainId,new(l())(e.response[1]).toString()]))),[te.totalVault]:Object.fromEntries(r.map((e=>[e.chainId,(0,M.lb)(Number(o.formatEther(new(l())(e.response.toString()).toString())),3)]))),[te.totalPoint]:Object.fromEntries(u.map((e=>[e.chainId,(0,M.lb)(Number(o.formatEther(new(l())(e.response.toString()).toString())))]))),[te.totalDebtObligation]:Object.fromEntries(m.map((e=>[e.chainId,(0,M.lb)(Number(o.formatEther(new(l())(e.response.toString()).toString())))]))),[te.totalGpBurned]:Object.fromEntries(c.map((e=>[e.chainId,(0,M.lb)(Number(o.formatEther(new(l())(e.response.toString()).toString())))])))}})})).catch((e=>{console.error("An error occurred:",e)}))}),[e,R]),G=(0,u.sJ)(p.DM);(0,T.Z)(C,8e3),(0,r.useEffect)(C,[G]);const A=(0,v.d)(),B=(0,O.b0)();return r.createElement("div",{className:Ce},r.createElement("div",{className:Ae},r.createElement(Re,null)),r.createElement("div",{className:Ge},r.createElement(ie,B),r.createElement(ce,{data:t}),r.createElement(he,{isMobile:A}),r.createElement("div",{className:Oe},"Copyright © 2023 Zypher Games. All rights reserved.")))},Be=(0,r.memo)((()=>r.createElement(Pe,null)),i())},89082:(e,t,n)=>{"use strict";n.d(t,{io:()=>r,Wg:()=>s,rY:()=>l});var a=n(2804),i=n(59314);const r=(0,a.cn)({key:"videoDialog",default:!1}),s=(0,a.cn)({key:"homeDateState",default:{totalVault:"0",totalPoint:"0",totalGame:"0",totalPlayers:"0",totalDebtObligation:"0",totalGpBurned:"0",total:{}},effects_UNSTABLE:[(0,i.Nh)("homeDateState")]}),l=(0,a.cn)({key:"gameListChainListState2",default:[]})},74001:(e,t,n)=>{"use strict";n.d(t,{b:()=>l,Z:()=>o});var a=n(95534),i=n.n(a),r=n(47631),s=n(6087);async function l(e){let{contractName:t,defaultValue:n}=e;const a=r.KC.filter((e=>e!==r.a_.Arbitrum)).map((async e=>{try{const n=(0,r.Cf)(e,t),a=await(0,s.VH)(i()(r.Vl[e]));return{contractAddress:n,method:"getBalance",chainId:e,response:await a.getBalance(n)}}catch(t){return{contractAddress:void 0,method:"getBalance",chainId:e,response:n}}}));return Promise.all(a)}async function o(e){let{contractFun:t,contracts:n,defaultValue:a}=e;await function(e){const t=+new Date;let n;return new Promise(((a,i)=>{n=setInterval((()=>{t+1e3*e<+new Date&&(clearInterval(n),a(!0))}),10)}))}(1);const i=r.KC.filter((e=>e!==r.a_.Arbitrum)).map((async e=>{try{const a=(0,r.Cf)(e,n.contractName),i=await t(e,a);let s;"function"==typeof n.params?s=n.params(e):Array.isArray(n.params)&&(s=n.params);const l=await i.read[n.method](s);return{method:n.method,chainId:e,response:l}}catch(t){if("getResidue"===n.method){const a=(0,r.Cf)(e,n.contractName);console.error("batchRequestContracts: ",a,e,n.contractName,t)}return{method:n.method,chainId:e,response:a}}}));return Promise.all(i)}},62882:(e,t,n)=>{"use strict";n.d(t,{O:()=>p});var a=n(44431),i=n.n(a),r=n(47631),s=n(49786),l=n(33030),o=n(88017);const u={[r.a_.Mainnet]:"BNB",[r.a_.Testnet]:"BT",[r.a_.Arbitrum]:"AO",[r.a_.ArbitrumGoerli]:"AGT",[r.a_.ArbitrumRinkeby]:"ARBR",[r.a_.ThunderCore]:"TT",[r.a_.ThunderCoreTestnet]:"TST",[r.a_.FindoraTest]:"GT",[r.a_.LineaTestnet]:"LT",[r.a_.LineaMainnet]:"LM",[r.a_.POLYGON_MUMBAI]:"PM",[r.a_.POLYGON_ZKEVM]:"PZT",[r.a_.OPBNB]:"OB",[r.a_.ScrollSepoliaTestnet]:"SST",[r.a_.ScrollAlphaTestnet]:"SAT",[r.a_.OPBNBTEST]:"OBT"},p=e=>{let{chainId:t,game:n,gameIdInfo:a}=e;const{status:r,gameId:p,players:m,winner:d,cardNumbers:y,selectedNumbers:c}=n,[b,f,g,,T,,h]=a;try{const e=r;let n="".concat(m.length," players"),b=new(i())(g).dividedBy(m.length).toString();b="0"===b?"5000":b;let f="-",h="-";if(e===s._.End){n=d;const e=new(i())(T);f=(0,o.lb)(Number(T)),h=(0,o.lb)(e.dividedBy(new(i())(b)).toNumber())}return b=(0,o.lb)(Number(b),0),{chainId:t,status:e,startTime:(0,l.xz)(a[0]),startTimeMobile:(0,l._X)(a[0]),game:s.W.zBingo,winner:d,players:m.map((e=>{let{cardId:t,isAbandoned:n,user:a}=e;return{user:a,cardId:t.toString(),isAbandoned:n}})),roomID:p.toString(),roomIDStr:(t?u[t]:"")+"B#"+p.toString(),bingoInfo:{cardNumbers:y,selectedNumbers:c},gameIdInfo:a,inputPerPlayer:b,multiplier:h,win:f,winnerOrPlayers:n}}catch(e){return void console.error("formatGames: ",e)}}},97005:(e,t,n)=>{var a=n(67294);function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(a);!function(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}('.marquee-container {\n overflow-x: hidden !important;\n display: flex !important;\n flex-direction: row !important;\n position: relative;\n width: var(--width);\n transform: var(--transform);\n}\n.marquee-container:hover div {\n animation-play-state: var(--pause-on-hover);\n}\n.marquee-container:active div {\n animation-play-state: var(--pause-on-click);\n}\n\n.overlay {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.overlay::before, .overlay::after {\n background: linear-gradient(to right, var(--gradient-color));\n content: "";\n height: 100%;\n position: absolute;\n width: var(--gradient-width);\n z-index: 2;\n}\n.overlay::after {\n right: 0;\n top: 0;\n transform: rotateZ(180deg);\n}\n.overlay::before {\n left: 0;\n top: 0;\n}\n\n.marquee {\n flex: 0 0 auto;\n min-width: var(--min-width);\n z-index: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n animation: scroll var(--duration) linear var(--delay) var(--iteration-count);\n animation-play-state: var(--play);\n animation-delay: var(--delay);\n animation-direction: var(--direction);\n}\n@keyframes scroll {\n 0% {\n transform: translateX(0%);\n }\n 100% {\n transform: translateX(-100%);\n }\n}\n\n.initial-child-container {\n flex: 0 0 auto;\n display: flex;\n min-width: auto;\n flex-direction: row;\n}\n\n.child {\n transform: var(--transform);\n}');const s=a.forwardRef((function({style:e={},className:t="",autoFill:n=!1,play:i=!0,pauseOnHover:s=!1,pauseOnClick:l=!1,direction:o="left",speed:u=50,delay:p=0,loop:m=0,gradient:d=!1,gradientColor:y=[255,255,255],gradientWidth:c=200,onFinish:b,onCycleComplete:f,onMount:g,children:T},h){const[v,w]=a.useState(0),[E,_]=a.useState(0),[x,M]=a.useState(1),[N,I]=a.useState(!1),R=a.useRef(null),C=h||R,G=a.useRef(null),A=a.useCallback((()=>{if(G.current&&C.current){const e=C.current.getBoundingClientRect(),t=G.current.getBoundingClientRect();let a=e.width,i=t.width;"up"!==o&&"down"!==o||(a=e.height,i=t.height),M(n&&a&&i&&i{if(N&&(A(),G.current&&C.current)){const e=new ResizeObserver((()=>A()));return e.observe(C.current),e.observe(G.current),()=>{e&&e.disconnect()}}}),[A,C,N]),a.useEffect((()=>{A()}),[A,T]),a.useEffect((()=>{I(!0)}),[]),a.useEffect((()=>{"function"==typeof g&&g()}),[]);const O=a.useMemo((()=>n?E*x/u:EObject.assign(Object.assign({},e),{"--pause-on-hover":!i||s?"paused":"running","--pause-on-click":!i||s&&!l||l?"paused":"running","--width":"up"===o||"down"===o?"100vh":"100%","--transform":"up"===o?"rotate(-90deg)":"down"===o?"rotate(90deg)":"none"})),[e,i,s,l,o]),D=a.useMemo((()=>({"--gradient-color":`${P}, 1), ${P}, 0)`,"--gradient-width":"number"==typeof c?`${c}px`:c})),[P,c]),S=a.useMemo((()=>({"--play":i?"running":"paused","--direction":"left"===o?"normal":"reverse","--duration":`${O}s`,"--delay":`${p}s`,"--iteration-count":m?`${m}`:"infinite","--min-width":n?"auto":"100%"})),[i,o,O,p,m,n]),k=a.useMemo((()=>({"--transform":"up"===o?"rotate(90deg)":"down"===o?"rotate(-90deg)":"none"})),[o]),L=a.useCallback((e=>[...Array(Number.isFinite(e)&&e>=0?e:0)].map(((e,t)=>r.default.createElement(a.Fragment,{key:t},a.Children.map(T,(e=>r.default.createElement("div",{style:k,className:"child"},e))))))),[k,T]);return N?r.default.createElement("div",{ref:C,style:B,className:"marquee-container "+t},d&&r.default.createElement("div",{style:D,className:"overlay"}),r.default.createElement("div",{className:"marquee",style:S,onAnimationIteration:f,onAnimationEnd:b},r.default.createElement("div",{className:"initial-child-container",ref:G},a.Children.map(T,(e=>r.default.createElement("div",{style:k,className:"child"},e)))),L(x-1)),r.default.createElement("div",{className:"marquee",style:S},L(x))):null}));t.Z=s},46896:()=>{},94083:()=>{},50490:e=>{"use strict";e.exports=JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint8[][]","name":"playerCardNumbers","type":"uint8[][]"}],"name":"Bingo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"isOvertime","type":"bool"}],"name":"GameHalted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":true,"internalType":"uint256","name":"cardId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"position","type":"uint8"}],"name":"GameParticipated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":false,"internalType":"address","name":"cardContract","type":"address"},{"indexed":false,"internalType":"address[]","name":"players","type":"address[]"}],"name":"GameStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"}],"name":"LineupJoined","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"}],"name":"LineupLeft","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"round","type":"uint32"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint8","name":"number","type":"uint8"}],"name":"NumberSelected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newReward","type":"address"},{"indexed":true,"internalType":"address","name":"oldReward","type":"address"}],"name":"RewardChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"GAME_REWARD_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RECENT_GAME_COUNTS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"_seasonLogs","outputs":[{"internalType":"uint256","name":"wins","type":"uint256"},{"internalType":"uint256","name":"joined","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"bytes","name":"signedGameLabel","type":"bytes"}],"name":"bingo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expectedLines","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deno","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameCard","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"getCurrentRound","outputs":[{"internalType":"uint32","name":"round","type":"uint32"},{"internalType":"address","name":"player","type":"address"},{"internalType":"uint32","name":"remain","type":"uint32"},{"internalType":"string","name":"status","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"getGameInfo","outputs":[{"internalType":"uint32","name":"startedAt","type":"uint32"},{"internalType":"uint32","name":"endedAt","type":"uint32"},{"internalType":"address","name":"winner","type":"address"},{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cardId","type":"uint256"}],"internalType":"struct IBingoRoom.Participant[]","name":"players","type":"tuple[]"},{"components":[{"internalType":"uint32","name":"round","type":"uint32"},{"internalType":"uint8","name":"number","type":"uint8"},{"internalType":"uint32","name":"timestamp","type":"uint32"},{"internalType":"address","name":"player","type":"address"}],"internalType":"struct IBingoRoom.GameRound[]","name":"rounds","type":"tuple[]"},{"internalType":"string","name":"status","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"getLatestRound","outputs":[{"components":[{"internalType":"uint32","name":"round","type":"uint32"},{"internalType":"uint8","name":"number","type":"uint8"},{"internalType":"uint32","name":"timestamp","type":"uint32"},{"internalType":"address","name":"player","type":"address"}],"internalType":"struct IBingoRoom.GameRound","name":"last","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNextKeyLabel","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"getSelectedNumbers","outputs":[{"internalType":"uint8[]","name":"numbers","type":"uint8[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gameCard","type":"address"},{"internalType":"uint8","name":"_expectedLines","type":"uint8"},{"internalType":"uint8","name":"_minPlayers","type":"uint8"},{"internalType":"uint8","name":"_maxPlayers","type":"uint8"},{"internalType":"uint8","name":"minCardNumber","type":"uint8"},{"internalType":"uint8","name":"maxCardNumber","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"zkCard","type":"bytes"}],"name":"join","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"leave","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lineupUsers","outputs":[{"internalType":"address[]","name":"list","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPlayers","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPlayers","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"title","type":"string"}],"name":"newSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"skip","type":"uint256"}],"name":"playedGames","outputs":[{"components":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"string","name":"status","type":"string"},{"internalType":"address","name":"winner","type":"address"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"uint8[]","name":"selectedNumbers","type":"uint8[]"},{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cardId","type":"uint256"}],"internalType":"struct IBingoRoom.Participant[]","name":"players","type":"tuple[]"}],"internalType":"struct IBingoRoom.RecentGame[]","name":"games","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum IBingoRoom.RecentGameFilter","name":"filter","type":"uint8"}],"name":"recentGames","outputs":[{"components":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"string","name":"status","type":"string"},{"internalType":"address","name":"winner","type":"address"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"uint8[]","name":"selectedNumbers","type":"uint8[]"},{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cardId","type":"uint256"}],"internalType":"struct IBingoRoom.Participant[]","name":"players","type":"tuple[]"}],"internalType":"struct IBingoRoom.RecentGame[]","name":"games","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"bytes","name":"signedGameLabel","type":"bytes"}],"name":"restoreGame","outputs":[{"internalType":"uint256","name":"playingGameId","type":"uint256"},{"internalType":"uint32","name":"autoEndTime","type":"uint32"},{"internalType":"bool","name":"isCardContentMatched","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint8","name":"number","type":"uint8"},{"internalType":"uint8[][]","name":"cardNumbers","type":"uint8[][]"},{"internalType":"bytes","name":"signedGameLabel","type":"bytes"}],"name":"selectAndBingo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint8","name":"number","type":"uint8"}],"name":"selectNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"startTimeout","type":"uint32"},{"internalType":"uint8","name":"boostRounds","type":"uint8"},{"internalType":"uint32","name":"roundGap","type":"uint32"},{"internalType":"uint32","name":"roundTimeout","type":"uint32"},{"internalType":"uint32","name":"maxDuration","type":"uint32"}],"name":"setGameTimers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newReward","type":"address"},{"internalType":"uint32","name":"amount","type":"uint32"}],"name":"setReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"summary","outputs":[{"internalType":"uint256","name":"totalGameStarted","type":"uint256"},{"internalType":"uint256","name":"totalPlayersJoined","type":"uint256"},{"internalType":"uint256","name":"totalRewardDistributed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timer","outputs":[{"components":[{"internalType":"uint32","name":"startTimeout","type":"uint32"},{"internalType":"uint8","name":"boostRounds","type":"uint8"},{"internalType":"uint32","name":"roundGap","type":"uint32"},{"internalType":"uint32","name":"roundTimeout","type":"uint32"},{"internalType":"uint32","name":"maxDuration","type":"uint32"}],"internalType":"struct BingoGameRoom.GameTimeout","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userRecords","outputs":[{"components":[{"internalType":"uint256","name":"wins","type":"uint256"},{"internalType":"uint256","name":"joined","type":"uint256"}],"internalType":"struct IUserCenter.PlayerStatistics","name":"current","type":"tuple"},{"components":[{"internalType":"uint256","name":"wins","type":"uint256"},{"internalType":"uint256","name":"joined","type":"uint256"}],"internalType":"struct IUserCenter.PlayerStatistics","name":"overall","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"}]')}}]); \ No newline at end of file diff --git a/6418.0cd106d3.bundle.js b/7205.ad70b7c0.bundle.js similarity index 56% rename from 6418.0cd106d3.bundle.js rename to 7205.ad70b7c0.bundle.js index 88c52a0..ac1ba33 100644 --- a/6418.0cd106d3.bundle.js +++ b/7205.ad70b7c0.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbingo_frontend=self.webpackChunkbingo_frontend||[]).push([[6418],{91856:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Oe});n(14574);var a,r=n(56590),i=n(67294),s=n(2804),l=n(29163),o=n(21449),p=n(76040),u=n(9120),d=n(18446),m=n.n(d),y=n(94184),c=n.n(y),b=n(79655),f=n(80652),g=n(11967),w=n(53127),h=(n(15144),n(2307));const T=(0,l.ZP)(h.Z)(a||(x=["\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 20px;\n overflow: hidden;\n p {\n margin: 0;\n padding: 0;\n }\n th {\n background: rgba(255, 255, 255, 0.04) !important;\n color: #fff !important;\n border: 0px !important;\n opacity: 0.6000000238418579;\n white-space: nowrap;\n }\n .ant-table-thead > tr > th {\n font-weight: 400;\n }\n .ant-table-tbody > tr > td {\n white-space: nowrap;\n border: 0px;\n &:hover {\n background: transparent;\n }\n }\n .ant-table-tbody > tr.ant-table-placeholder:hover > td {\n background: none;\n }\n .ant-table {\n background: transparent;\n }\n .editable-row {\n td {\n border: 0px;\n color: #fff;\n }\n .ant-table-cell-row-hover {\n background: none !important;\n }\n &:hover {\n td {\n background: none !important;\n }\n }\n }\n"],v||(v=x.slice(0)),a=Object.freeze(Object.defineProperties(x,{raw:{value:Object.freeze(v)}}))));var x,v,E;const N=(0,l.ZP)(T)(E||(E=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n table th {\n font-size: 16px;\n @media (max-width: 1400px) {\n font-size: 13px;\n }\n }\n table td {\n font-size: 16px;\n }\n\n tr > td,\n & tr > th {\n &:first-child {\n padding-left: 40px;\n @media (max-width: 1400px) {\n padding-left: 20px;\n }\n }\n\n &:last-child {\n text-align: right;\n padding-right: 40px;\n @media (max-width: 1400px) {\n padding-right: 20px;\n }\n p {\n justify-content: right;\n }\n }\n }\n &.table {\n tr > td,\n & tr > th {\n &:nth-child(1) {\n max-width: 140px;\n width: 10%;\n }\n &:nth-child(2) {\n max-width: 140px;\n width: 10%;\n }\n &:nth-child(3) {\n max-width: 140px;\n width: 10%;\n }\n &:nth-child(4) {\n width: 15%;\n max-width: 280px;\n }\n @media (max-width: 1400px) {\n &:nth-child(1) {\n width: 90px;\n }\n &:nth-child(2) {\n width: 90px;\n }\n &:nth-child(3) {\n width: 90px;\n }\n &:nth-child(4) {\n width: 15%;\n max-width: 220px;\n }\n }\n }\n }\n .ant-table-row {\n height: 70px;\n }\n .editable-row {\n background-color: #131313;\n transition: background-color 0.3s;\n &:hover {\n background-color: rgba(255, 255, 255, 0.04);\n }\n }\n"])));var M,I=n(56877),_=n(55347),k=n(49786);const O=l.ZP.div(M||(M=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n button {\n margin: 0;\n padding: 0;\n }\n .grey {\n opacity: 0.7;\n }\n"]))),S=(0,i.memo)((e=>{let{status:t,bingoInfo:n,isMobile:a}=e;const{cardNumbers:r,selectedNumbers:s}=n;return i.createElement(O,null,t===k._.End?i.createElement(_.Z,{cardNumbers:r,selectedNumbers:s,isMobile:a}):i.createElement("p",{className:"grey"},"none"))}),m());var P=n(61511),j=n(23697);const A=(0,i.memo)((e=>{let{loading:t,className:n,dataSource:a,showFilter:s,hasError:l,loadMorecss:o}=e;const[d,m]=(0,i.useState)("All"),y=(0,i.useMemo)((()=>a.length&&d&&"All"!==d?a.filter((e=>e.chainId===d)).slice(0,20):a.slice(0,20)),[a.length,d]),h=(0,u.d)(),T=(0,i.useMemo)((()=>[{title:"Status",dataIndex:"status",key:"status",render:e=>i.createElement(j.Z,{status:e,isMobile:h})},{title:"Start time",dataIndex:"startTime",key:"startTime"},{title:"Game",dataIndex:"game",key:"game"},{title:"Winner/Players",dataIndex:"winnerOrPlayers",key:"winnerOrPlayers",render:e=>i.createElement(P.C,{label:e,showPoint:!1,isMobile:h})},{title:"Room ID",dataIndex:"roomIDStr",key:"roomIDStr"},{title:"Bingo Card",dataIndex:"bingoInfo",key:"bingoInfo",render:(e,t)=>{let{status:n}=t;return i.createElement(S,{status:n,bingoInfo:e,isMobile:h})}},{title:"Input per player",dataIndex:"inputPerPlayer",key:"inputPerPlayer",render:e=>i.createElement(P.C,{label:e,showPoint:!0,isMobile:h})},{title:"Multiplier",dataIndex:"multiplier",key:"multiplier"},{title:"Win",dataIndex:"win",key:"win",render:e=>i.createElement(P.C,{label:e,showPoint:!0,isMobile:h})}]),[h]);return i.createElement("div",{className:w.Z.gameList},s?h?i.createElement(b.rU,{to:"/games/list",className:w.Z.more_right},"More",i.createElement(f.Z,{name:"right"})):i.createElement(g.Z,{setSelectValue:m}):null,h?0===y.length?i.createElement(r.default,{locale:{emptyText:i.createElement(p.i,{loading:t,hasError:l,errorCss:w.Z.error,loadMoreCss:o?w.Z.loadMore:void 0})}}):y.slice(0,5).map((e=>i.createElement(I.Z,{key:e.roomID,item:e}))):i.createElement(N,{className:c()(w.Z.table,n),dataSource:y,rowClassName:(e,t)=>t%2==0?"editable-row even-row":"editable-row odd-row",pagination:!1,columns:T,isMobile:null!=h&&h,rowKey:"roomIDStr",locale:{emptyText:i.createElement(p.i,{loading:t,hasError:l,errorCss:w.Z.error,loadMoreCss:o?w.Z.loadMore:void 0})},scroll:{y:700,x:!0}}))}),m());var C,L,R=n(27370);function Z(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const B=l.ZP.div(C||(C=Z(["\n border-radius: 16px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n background: rgba(255, 255, 255, 0.04);\n padding: 19px;\n h6 {\n font-size: 16px;\n font-weight: 300;\n line-height: 20px;\n color: #65edbc;\n margin-bottom: 20px;\n }\n"]))),z=l.ZP.div(L||(L=Z(["\n width: 100%;\n display: flex;\n gap: 20px;\n // justify-content: space-between;\n flex-wrap: wrap;\n"]))),G=(0,i.memo)((e=>{let{gameList:t}=e;return i.createElement(z,null,(null!=t?t:[]).map((e=>i.createElement(D,{item:e,key:e.roomIDStr}))))}),m()),D=(0,i.memo)((e=>{let{item:t}=e;return i.createElement(B,null,i.createElement("h6",null,t.roomIDStr),i.createElement(R.dy,{cardNumbers:t.bingoInfo.cardNumbers,selectedNumbers:t.bingoInfo.selectedNumbers,className:"profileBingoItem"}))}),m()),F=G;var W=n(66847),J=n(88017);const U="profileBanner_header__jQN4E",q="profileBanner_bannerInner__soIzl",V="profileBanner_avatarBorder__z23xW",H="profileBanner_account__6-B4m",Q="profileBanner_box__rIJgU",$="profileBanner_address__A65pv",K="profileBanner_data__Roj6l",X="profileBanner_mdataTop__iA+gc",Y="profileBanner_mdataBottom__Aj5ab",ee="profileBanner_item__dXhuC",te=(0,i.memo)((e=>{let{account:t,gamesLen:n,gamesWon:a,winningPercent:r,inputNum:s,isMobile:l,winNum:o}=e;return i.createElement("div",{className:U},i.createElement("div",{className:q},i.createElement(W.Z,{className:H,account:t,size:l?64:100,showAccount:!!l,AvatarBorder:ae}),i.createElement("div",{className:Q},l?null:i.createElement("div",{className:$},(0,J.LM)(t)),i.createElement("div",{className:K},i.createElement(ne,{isMobile:l,className:X},i.createElement("div",{className:ee},i.createElement("span",null,"Games"),i.createElement("em",null,n)),i.createElement("div",{className:ee},i.createElement("span",null,"Games Won"),i.createElement("em",null,a)),i.createElement("div",{className:ee},i.createElement("span",null,"Winning %"),i.createElement("em",null,r))),i.createElement(ne,{isMobile:l,className:Y},i.createElement("div",{className:ee},i.createElement("span",null,"Input"),i.createElement("em",null,s,i.createElement(P.Z,{isMobile:l}))),i.createElement("div",{className:ee},i.createElement("span",null,"Winnings"),i.createElement("em",null,o,i.createElement(P.Z,{isMobile:l}))))))))}),m()),ne=(0,i.memo)((e=>{let{className:t,isMobile:n,children:a}=e;return n?i.createElement("div",{className:t}," ",a):i.createElement(i.Fragment,null,a)}),m()),ae=(0,i.memo)((e=>{let{children:t}=e;return i.createElement("div",{className:V},t)}),m()),re=te,ie="tab_tab__bNuRB",se="tab_tabItem__Jq6pC",le="tab_cur__lzqtz",oe=(0,i.memo)((e=>{let{tab:t,list:n,setTab:a,className:r}=e;const s=(0,u.d)();return i.createElement("div",{className:c()(ie,r),style:{width:(s?110:120)*n.length}},n.map(((e,n)=>i.createElement("div",{key:e,className:c()(se,{[le]:t===n}),onClick:()=>a(n)},e))))}),m()),pe=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseTokenURI","type":"string"},{"internalType":"uint256","name":"initialId","type":"uint256"},{"internalType":"uint32","name":"maxSupply_","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"maxSupply_","type":"uint32"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]');var ue=n(44431),de=n.n(ue),me=n(46474),ye=n(47631),ce=n(5975);const be=(e,t,n)=>(0,ce.uN)({abi:pe,address:null!=t?t:(0,ye.$y)(e,ye.iJ.Reward),signer:n,chainId:e});var fe=n(2039),ge=n(59619),we=n(80941);var he=n(43733),Te=n(29562),xe=n(62882);var ve=n(81165);const Ee="profile_profile__U5qAJ",Ne="profile_content__87Ss8",Me="profile_item__1epgS",Ie="profile_main__MN67l";var _e;const ke=l.ZP.div(_e||(_e=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n color: #65edbc;\n font-size: 16px;\n padding: 20px;\n top: 0;\n left: 0;\n position: absolute;\n"]))),Oe=e=>{const[t,n]=(0,i.useState)(0),a=(0,s.Zl)(o.LR),[l,d]=(0,s.FV)(o.vA),{gamesLen:y,gamesWon:c,winningPercent:b,inputNum:f,winNum:g,account:w,chainId:h}=(()=>{const{chainId:e,account:t}=(0,ge.a)(),[n,a]=(0,i.useState)({joinGameNumber:"-",winGameNumber:"-",inputNum:"-",winNum:"-"}),r=(0,i.useMemo)((()=>{const{joinGameNumber:e,winGameNumber:t}=n;return t&&e&&"-"!==e?(Number(t)/Number(e)*100).toFixed(2):0===Number(t)?"0%":"-"}),[n]),s=(0,i.useCallback)((async()=>{const n=null!=e?e:ye.VW,r=ye.d8[n];if(console.log({api:r,account:t}),!r||!t)return;const i=await(0,we.W)(r,{method:"POST",data:JSON.stringify({query:'query MyQuery {\n playerDatas(\n first: 1\n where: {player: "'.concat(t,'"}\n ) {\n joinAmount\n winAmount\n player\n jCount\n wCount\n }\n }'),variables:{},operationName:"MyQuery"}),headers:{"Content-Type":"application/json"}});i.data&&i.data.data&&i.data.data.playerDatas&&i.data.data.playerDatas.length&&a({joinGameNumber:"".concat(i.data.data.playerDatas[0].jCount),winGameNumber:"".concat(i.data.data.playerDatas[0].wCount),winNum:(0,J.lb)(Number(me.formatEther(i.data.data.playerDatas[0].winAmount)),0),inputNum:(0,J.lb)(Number(me.formatEther(i.data.data.playerDatas[0].joinAmount)),0)})}),[e,t]);return(0,i.useEffect)((()=>{e&&t&&s()}),[e,t]),{gamesLen:"".concat((0,J.lb)(Number(n.joinGameNumber),0)),gamesWon:"".concat((0,J.lb)(Number(n.winGameNumber),0)),winningPercent:r,inputNum:n.inputNum,winNum:n.winNum,account:t,chainId:e}})(),{list:T,listLoading:x}=(e=>{const[t,n]=(0,i.useState)(!1),[a,r]=(0,i.useState)([]),{chainId:s,account:l}=(0,ge.a)(),o=(0,i.useCallback)((async()=>{if(s&&l){n(!0);const e=(0,ye.$y)(s,ye.iJ.Reward),t=await be(s),a=await t.read.balanceOf([l]),i=new(de())(a).toNumber();if(i>0){const t=new Array(i).fill("").map(((e,t)=>t)).map((t=>({reference:ye.iJ.Reward+t,contractAddress:e,abi:pe,calls:[{methodName:"tokenOfOwnerByIndex",reference:"tokenOfOwnerByIndex",methodParameters:[l,t]}]}))),n=await(0,fe.Z)();if(n){const{results:e}=await n.call(t);if(e){const t=Object.values(e).map((e=>{const t=e.callsReturnContext[0].returnValues[0].hex;return new(de())(t).toString()}));r(t)}else r([])}}else r([]);n(!1)}}),[s,l]);return(0,i.useEffect)((()=>{s&&l&&2===e&&o()}),[s,l,e]),{list:a,listLoading:t}})(t),{playedGamesLoading:v}=(e=>{let{historyList:t,setHistoryList:n}=e;const[a,r]=(0,i.useState)(!1),{chainId:s,account:l}=(0,ge.a)(),o=(0,i.useCallback)((async()=>{try{if(s&&l){r(!0);const e=(0,he.ZP)(s),a=await e.read.playedGames([l,0]),i=a.map((e=>e.gameId.toString())),{gameInfo:o}=await(0,Te.G)({chainId:s,gameIdList:i})||{};if(o){r(!1);const e=a.map(((e,t)=>(0,xe.O)({chainId:s,game:e,gameIdInfo:o[t]})));0!==t.length&&m()(t,e)||n(e)}}}catch(e){console.error("getPlayedGames: ",e)}}),[s,l]);return(0,i.useEffect)((()=>{s&&l&&o()}),[s,l]),{playedGamesLoading:a}})({historyList:l,setHistoryList:d}),{list:E,listLoading:N}=(e=>{let{chainId:t,tab:n,historyList:a}=e;const{account:r}=(0,ge.a)(),[s,l]=(0,i.useState)(!1),[o,p]=(0,i.useState)(),u=(0,i.useCallback)((async()=>{if(a&&a.length){l(!0);const e=a.filter((e=>e.winner.toLowerCase()==="".concat(r).toLowerCase()));p(e),l(!1)}}),[(null!=a?a:[]).length,r]);return(0,i.useEffect)((()=>{1===n&&a&&a.length&&u()}),[a,n,r]),{list:o,listLoading:s}})({chainId:h,tab:t,historyList:l}),M=(0,u.d)(),[I,_]=(0,i.useState)();return(0,i.useEffect)((()=>{setTimeout((()=>{_(1)}),1e3)}),[]),(0,i.useEffect)((()=>{I&&a(!w)}),[I,w]),i.createElement(i.Fragment,null,i.createElement("div",{className:Ee},i.createElement("div",{className:Ne},i.createElement(re,{account:w,gamesLen:y,gamesWon:c,winningPercent:b,inputNum:f,isMobile:M,winNum:g}),i.createElement(oe,{tab:t,setTab:n,list:["History","Bingo Card","My Box"]}),i.createElement("div",{className:Ie},0===t?i.createElement(A,{loading:null==v||v,dataSource:l,account:w,showFilter:!1}):1===t?E&&E.length?i.createElement(F,{gameList:E}):i.createElement(p.i,{loading:N||v}):i.createElement(r.default,{grid:{gutter:20,xs:2,sm:2,md:2,lg:3,xl:4,xxl:5},locale:{emptyText:i.createElement(p.i,{loading:x})},dataSource:T,renderItem:(e,t)=>i.createElement(r.default.Item,null,i.createElement("div",{className:Me,key:t},i.createElement("img",{src:ve,width:"100%"}),i.createElement(ke,null,"#",e)))})))))}},81165:(e,t,n)=>{e.exports=n.p+"asset/6a240e36bc.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunkbingo_frontend=self.webpackChunkbingo_frontend||[]).push([[7205],{18858:(e,t,n)=>{n.r(t),n.d(t,{default:()=>_e});n(14574);var a,i=n(56590),r=n(67294),s=n(2804),l=n(29163),o=n(21449),p=n(76040),u=n(9120),d=n(18446),m=n.n(d),y=n(94184),c=n.n(y),b=n(79655),f=n(80652),g=n(11967),w=n(53127),h=(n(15144),n(2307));const x=(0,l.ZP)(h.Z)(a||(T=["\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 20px;\n overflow: hidden;\n p {\n margin: 0;\n padding: 0;\n }\n th {\n background: rgba(255, 255, 255, 0.04) !important;\n color: #fff !important;\n border: 0px !important;\n opacity: 0.6000000238418579;\n white-space: nowrap;\n }\n .ant-table-thead > tr > th {\n font-weight: 400;\n }\n .ant-table-tbody > tr > td {\n white-space: nowrap;\n border: 0px;\n &:hover {\n background: transparent;\n }\n }\n .ant-table-tbody > tr.ant-table-placeholder:hover > td {\n background: none;\n }\n .ant-table {\n background: transparent;\n }\n .editable-row {\n td {\n border: 0px;\n color: #fff;\n }\n .ant-table-cell-row-hover {\n background: none !important;\n }\n &:hover {\n td {\n background: none !important;\n }\n }\n }\n"],v||(v=T.slice(0)),a=Object.freeze(Object.defineProperties(T,{raw:{value:Object.freeze(v)}}))));var T,v,E;const N=(0,l.ZP)(x)(E||(E=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n table th {\n font-size: 16px;\n @media (max-width: 1400px) {\n font-size: 13px;\n }\n }\n table td {\n font-size: 16px;\n }\n\n tr > td,\n & tr > th {\n &:first-child {\n padding-left: 40px;\n @media (max-width: 1400px) {\n padding-left: 20px;\n }\n }\n\n &:last-child {\n text-align: right;\n padding-right: 40px;\n @media (max-width: 1400px) {\n padding-right: 20px;\n }\n p {\n justify-content: right;\n }\n }\n }\n &.table {\n tr > td,\n & tr > th {\n &:nth-child(1) {\n max-width: 140px;\n width: 10%;\n }\n &:nth-child(2) {\n max-width: 140px;\n width: 10%;\n }\n &:nth-child(3) {\n max-width: 140px;\n width: 10%;\n }\n &:nth-child(4) {\n width: 15%;\n max-width: 280px;\n }\n @media (max-width: 1400px) {\n &:nth-child(1) {\n width: 90px;\n }\n &:nth-child(2) {\n width: 90px;\n }\n &:nth-child(3) {\n width: 90px;\n }\n &:nth-child(4) {\n width: 15%;\n max-width: 220px;\n }\n }\n }\n }\n .ant-table-row {\n height: 70px;\n }\n .editable-row {\n background-color: #131313;\n transition: background-color 0.3s;\n &:hover {\n background-color: rgba(255, 255, 255, 0.04);\n }\n }\n"])));var I,M=n(56877),_=n(55347),k=n(49786);const O=l.ZP.div(I||(I=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n button {\n margin: 0;\n padding: 0;\n }\n .grey {\n opacity: 0.7;\n }\n"]))),S=(0,r.memo)((e=>{let{status:t,bingoInfo:n,isMobile:a}=e;const{cardNumbers:i,selectedNumbers:s}=n;return r.createElement(O,null,t===k._.End?r.createElement(_.Z,{cardNumbers:i,selectedNumbers:s,isMobile:a}):r.createElement("p",{className:"grey"},"none"))}),m());var P=n(61511),L=n(23697);const R=(0,r.memo)((e=>{let{loading:t,className:n,dataSource:a,showFilter:s,hasError:l,loadMorecss:o}=e;const[d,m]=(0,r.useState)("All"),y=(0,r.useMemo)((()=>a.length&&d&&"All"!==d?a.filter((e=>e.chainId===d)).slice(0,20):a.slice(0,20)),[a.length,d]),h=(0,u.d)(),x=(0,r.useMemo)((()=>[{title:"Status",dataIndex:"status",key:"status",render:e=>r.createElement(L.Z,{status:e,isMobile:h})},{title:"Start time",dataIndex:"startTime",key:"startTime"},{title:"Game",dataIndex:"game",key:"game"},{title:"Winner/Players",dataIndex:"winnerOrPlayers",key:"winnerOrPlayers",render:e=>r.createElement(P.C,{label:e,showPoint:!1,isMobile:h})},{title:"Room ID",dataIndex:"roomIDStr",key:"roomIDStr"},{title:"Bingo Card",dataIndex:"bingoInfo",key:"bingoInfo",render:(e,t)=>{let{status:n}=t;return r.createElement(S,{status:n,bingoInfo:e,isMobile:h})}},{title:"Input per player",dataIndex:"inputPerPlayer",key:"inputPerPlayer",render:e=>r.createElement(P.C,{label:e,showPoint:!0,isMobile:h})},{title:"Multiplier",dataIndex:"multiplier",key:"multiplier"},{title:"Win",dataIndex:"win",key:"win",render:e=>r.createElement(P.C,{label:e,showPoint:!0,isMobile:h})}]),[h]);return r.createElement("div",{className:w.Z.gameList},s?h?r.createElement(b.rU,{to:"/games/list",className:w.Z.more_right},"More",r.createElement(f.Z,{name:"right"})):r.createElement(g.Z,{setSelectValue:m}):null,h?0===y.length?r.createElement(i.default,{locale:{emptyText:r.createElement(p.i,{loading:t,hasError:l,errorCss:w.Z.error,loadMoreCss:o?w.Z.loadMore:void 0})}}):y.slice(0,5).map((e=>r.createElement(M.Z,{key:e.roomID,item:e}))):r.createElement(N,{className:c()(w.Z.table,n),dataSource:y,rowClassName:(e,t)=>t%2==0?"editable-row even-row":"editable-row odd-row",pagination:!1,columns:x,isMobile:null!=h&&h,rowKey:"roomIDStr",locale:{emptyText:r.createElement(p.i,{loading:t,hasError:l,errorCss:w.Z.error,loadMoreCss:o?w.Z.loadMore:void 0})},scroll:{y:700,x:!0}}))}),m());var A,j,Z=n(27370);function C(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const B=l.ZP.div(A||(A=C(["\n border-radius: 16px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n background: rgba(255, 255, 255, 0.04);\n padding: 19px;\n h6 {\n font-size: 16px;\n font-weight: 300;\n line-height: 20px;\n color: #65edbc;\n margin-bottom: 20px;\n }\n"]))),z=l.ZP.div(j||(j=C(["\n width: 100%;\n display: flex;\n gap: 20px;\n // justify-content: space-between;\n flex-wrap: wrap;\n"]))),G=(0,r.memo)((e=>{let{gameList:t}=e;return r.createElement(z,null,(null!=t?t:[]).map((e=>r.createElement(F,{item:e,key:e.roomIDStr}))))}),m()),F=(0,r.memo)((e=>{let{item:t}=e;return r.createElement(B,null,r.createElement("h6",null,t.roomIDStr),r.createElement(Z.dy,{cardNumbers:t.bingoInfo.cardNumbers,selectedNumbers:t.bingoInfo.selectedNumbers,className:"profileBingoItem"}))}),m()),W=G;var D=n(66847),U=n(88017);const J="profileBanner_header__jQN4E",q="profileBanner_bannerInner__soIzl",H="profileBanner_avatarBorder__z23xW",V="profileBanner_account__6-B4m",$="profileBanner_box__rIJgU",K="profileBanner_address__A65pv",Q="profileBanner_data__Roj6l",X="profileBanner_mdataTop__iA+gc",Y="profileBanner_mdataBottom__Aj5ab",ee="profileBanner_item__dXhuC",te=(0,r.memo)((e=>{let{account:t,gamesLen:n,gamesWon:a,winningPercent:i,inputNum:s,isMobile:l,winNum:o}=e;return r.createElement("div",{className:J},r.createElement("div",{className:q},r.createElement(D.Z,{className:V,account:t,size:l?64:100,showAccount:!!l,AvatarBorder:ae}),r.createElement("div",{className:$},l?null:r.createElement("div",{className:K},(0,U.LM)(t)),r.createElement("div",{className:Q},r.createElement(ne,{isMobile:l,className:X},r.createElement("div",{className:ee},r.createElement("span",null,"Games"),r.createElement("em",null,n)),r.createElement("div",{className:ee},r.createElement("span",null,"Games Won"),r.createElement("em",null,a)),r.createElement("div",{className:ee},r.createElement("span",null,"Winning %"),r.createElement("em",null,i))),r.createElement(ne,{isMobile:l,className:Y},r.createElement("div",{className:ee},r.createElement("span",null,"Input"),r.createElement("em",null,s,r.createElement(P.Z,{isMobile:l}))),r.createElement("div",{className:ee},r.createElement("span",null,"Winnings"),r.createElement("em",null,o,r.createElement(P.Z,{isMobile:l}))))))))}),m()),ne=(0,r.memo)((e=>{let{className:t,isMobile:n,children:a}=e;return n?r.createElement("div",{className:t}," ",a):r.createElement(r.Fragment,null,a)}),m()),ae=(0,r.memo)((e=>{let{children:t}=e;return r.createElement("div",{className:H},t)}),m()),ie=te,re="tab_tab__bNuRB",se="tab_tabItem__Jq6pC",le="tab_cur__lzqtz",oe=(0,r.memo)((e=>{let{tab:t,list:n,setTab:a,className:i}=e;const s=(0,u.d)();return r.createElement("div",{className:c()(re,i),style:{width:(s?110:120)*n.length}},n.map(((e,n)=>r.createElement("div",{key:e,className:c()(se,{[le]:t===n}),onClick:()=>a(n)},e))))}),m()),pe=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseTokenURI","type":"string"},{"internalType":"uint256","name":"initialId","type":"uint256"},{"internalType":"uint32","name":"maxSupply_","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"maxSupply_","type":"uint32"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]');var ue=n(44431),de=n.n(ue),me=n(47631),ye=n(5975);const ce=(e,t,n)=>(0,ye.uN)({abi:pe,address:null!=t?t:(0,me.$y)(e,me.iJ.Reward),signer:n,chainId:e});var be=n(2039),fe=n(59619);var ge=n(43733),we=n(29562),he=n(62882);var xe=n(81165);const Te="profile_profile__U5qAJ",ve="profile_content__87Ss8",Ee="profile_item__1epgS",Ne="profile_main__MN67l";var Ie;const Me=l.ZP.div(Ie||(Ie=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n color: #65edbc;\n font-size: 16px;\n padding: 20px;\n top: 0;\n left: 0;\n position: absolute;\n"]))),_e=e=>{const[t,n]=(0,r.useState)(0),a=(0,s.Zl)(o.LR),[l,d]=(0,s.FV)(o.vA),{gamesLen:y,gamesWon:c,winningPercent:b,inputNum:f,winNum:g,account:w,chainId:h}=(e=>{const{chainId:t,account:n}=(0,fe.a)(),[a,i]=(0,r.useState)({joinGameNumber:"-",winGameNumber:"-",inputNum:"-",winNum:"-"}),s=(0,r.useMemo)((()=>{const{joinGameNumber:e,winGameNumber:t}=a;return t&&e&&"-"!==e?(Number(t)/Number(e)*100).toFixed(2):0===Number(t)?"0%":"-"}),[a]),l=(0,r.useCallback)((async()=>{if(!e||!e.length)return;let t=0;e.map((e=>{e.winner===n&&(t+=1)})),i({joinGameNumber:"".concat(e.length),winGameNumber:"".concat(t),winNum:"-",inputNum:"-"})}),[t,e,n]);return(0,r.useEffect)((()=>{t&&n&&l()}),[t,e,n]),{gamesLen:"".concat((0,U.lb)(Number(a.joinGameNumber),0)),gamesWon:"".concat((0,U.lb)(Number(a.winGameNumber),0)),winningPercent:s,inputNum:a.inputNum,winNum:a.winNum,account:n,chainId:t}})(l),{list:x,listLoading:T}=(e=>{const[t,n]=(0,r.useState)(!1),[a,i]=(0,r.useState)([]),{chainId:s,account:l}=(0,fe.a)(),o=(0,r.useCallback)((async()=>{if(s&&l){n(!0);const e=(0,me.$y)(s,me.iJ.Reward),t=await ce(s),a=await t.read.balanceOf([l]),r=new(de())(a).toNumber();if(r>0){const t=new Array(r).fill("").map(((e,t)=>t)).map((t=>({reference:me.iJ.Reward+t,contractAddress:e,abi:pe,calls:[{methodName:"tokenOfOwnerByIndex",reference:"tokenOfOwnerByIndex",methodParameters:[l,t]}]}))),n=await(0,be.Z)();if(n){const{results:e}=await n.call(t);if(e){const t=Object.values(e).map((e=>{const t=e.callsReturnContext[0].returnValues[0].hex;return new(de())(t).toString()}));i(t)}else i([])}}else i([]);n(!1)}}),[s,l]);return(0,r.useEffect)((()=>{s&&l&&2===e&&o()}),[s,l,e]),{list:a,listLoading:t}})(t),{playedGamesLoading:v}=(e=>{let{historyList:t,setHistoryList:n}=e;const[a,i]=(0,r.useState)(!1),{chainId:s,account:l}=(0,fe.a)(),o=(0,r.useCallback)((async()=>{try{if(s&&l){i(!0);const e=(0,ge.ZP)(s),a=await e.read.playedGames([l,0]),r=a.map((e=>e.gameId.toString())),{gameInfo:o}=await(0,we.G)({chainId:s,gameIdList:r})||{};if(o){i(!1);const e=a.map(((e,t)=>(0,he.O)({chainId:s,game:e,gameIdInfo:o[t]})));0!==t.length&&m()(t,e)||n(e)}}}catch(e){console.error("getPlayedGames: ",e)}}),[s,l]);return(0,r.useEffect)((()=>{s&&l&&o()}),[s,l]),{playedGamesLoading:a}})({historyList:l,setHistoryList:d}),{list:E,listLoading:N}=(e=>{let{chainId:t,tab:n,historyList:a}=e;const{account:i}=(0,fe.a)(),[s,l]=(0,r.useState)(!1),[o,p]=(0,r.useState)(),u=(0,r.useCallback)((async()=>{if(a&&a.length){l(!0);const e=a.filter((e=>e.winner.toLowerCase()==="".concat(i).toLowerCase()));p(e),l(!1)}}),[(null!=a?a:[]).length,i]);return(0,r.useEffect)((()=>{1===n&&a&&a.length&&u()}),[a,n,i]),{list:o,listLoading:s}})({chainId:h,tab:t,historyList:l}),I=(0,u.d)(),[M,_]=(0,r.useState)();return(0,r.useEffect)((()=>{setTimeout((()=>{_(1)}),1e3)}),[]),(0,r.useEffect)((()=>{M&&a(!w)}),[M,w]),r.createElement(r.Fragment,null,r.createElement("div",{className:Te},r.createElement("div",{className:ve},r.createElement(ie,{account:w,gamesLen:y,gamesWon:c,winningPercent:b,inputNum:f,isMobile:I,winNum:g}),r.createElement(oe,{tab:t,setTab:n,list:["History","Bingo Card","My Box"]}),r.createElement("div",{className:Ne},0===t?r.createElement(R,{loading:null==v||v,dataSource:l,account:w,showFilter:!1}):1===t?E&&E.length?r.createElement(W,{gameList:E}):r.createElement(p.i,{loading:N||v}):r.createElement(i.default,{grid:{gutter:20,xs:2,sm:2,md:2,lg:3,xl:4,xxl:5},locale:{emptyText:r.createElement(p.i,{loading:T})},dataSource:x,renderItem:(e,t)=>r.createElement(i.default.Item,null,r.createElement("div",{className:Ee,key:t},r.createElement("img",{src:xe,width:"100%"}),r.createElement(Me,null,"#",e)))})))))}},81165:(e,t,n)=>{e.exports=n.p+"asset/6a240e36bc.png"}}]); \ No newline at end of file diff --git a/6418.f5179f4b.chunk.css b/7205.f5179f4b.chunk.css similarity index 100% rename from 6418.f5179f4b.chunk.css rename to 7205.f5179f4b.chunk.css diff --git a/index.html b/index.html index 4736870..4e8a506 100644 --- a/index.html +++ b/index.html @@ -2,4 +2,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-L0QHB6VSZV');
\ No newline at end of file + gtag('config', 'G-L0QHB6VSZV');
\ No newline at end of file diff --git a/main.152e208c.bundle.js b/main.152e208c.bundle.js deleted file mode 100644 index ab39b0e..0000000 --- a/main.152e208c.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.152e208c.bundle.js.LICENSE.txt */ -(self.webpackChunkbingo_frontend=self.webpackChunkbingo_frontend||[]).push([[179],{92138:(e,t,r)=>{"use strict";r.r(t),r.d(t,{blue:()=>C,cyan:()=>k,geekblue:()=>M,generate:()=>d,gold:()=>y,green:()=>E,grey:()=>S,lime:()=>_,magenta:()=>A,orange:()=>b,presetDarkPalettes:()=>m,presetPalettes:()=>p,presetPrimaryColors:()=>h,purple:()=>x,red:()=>g,volcano:()=>v,yellow:()=>w});var n=r(86500),i=r(1350),o=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function a(e){var t=e.r,r=e.g,i=e.b,o=(0,n.py)(t,r,i);return{h:360*o.h,s:o.s,v:o.v}}function s(e){var t=e.r,r=e.g,i=e.b;return"#".concat((0,n.vq)(t,r,i,!1))}function u(e,t,r){var n=r/100;return{r:(t.r-e.r)*n+e.r,g:(t.g-e.g)*n+e.g,b:(t.b-e.b)*n+e.b}}function l(e,t,r){var n;return(n=Math.round(e.h)>=60&&Math.round(e.h)<=240?r?Math.round(e.h)-2*t:Math.round(e.h)+2*t:r?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?n+=360:n>=360&&(n-=360),n}function c(e,t,r){return 0===e.h&&0===e.s?e.s:((n=r?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(n=1),r&&5===t&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2)));var n}function f(e,t,r){var n;return(n=r?e.v+.05*t:e.v-.15*t)>1&&(n=1),Number(n.toFixed(2))}function d(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],n=(0,i.uA)(e),d=5;d>0;d-=1){var h=a(n),p=s((0,i.uA)({h:l(h,d,!0),s:c(h,d,!0),v:f(h,d,!0)}));r.push(p)}r.push(s(n));for(var m=1;m<=4;m+=1){var g=a(n),v=s((0,i.uA)({h:l(g,m),s:c(g,m),v:f(g,m)}));r.push(v)}return"dark"===t.theme?o.map((function(e){var n=e.index,o=e.opacity;return s(u((0,i.uA)(t.backgroundColor||"#141414"),(0,i.uA)(r[n]),100*o))})):r}var h={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},p={},m={};Object.keys(h).forEach((function(e){p[e]=d(h[e]),p[e].primary=p[e][5],m[e]=d(h[e],{theme:"dark",backgroundColor:"#141414"}),m[e].primary=m[e][5]}));var g=p.red,v=p.volcano,y=p.gold,b=p.orange,w=p.yellow,_=p.lime,E=p.green,k=p.cyan,C=p.blue,M=p.geekblue,x=p.purple,A=p.magenta,S=p.grey},25413:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"}},85368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"}},16976:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"}},67303:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"}},77384:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"}},79203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"}},33282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"}},78515:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"}},34950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"}},13864:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"}},15369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"}},20702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"}},6594:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"}},25828:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"}},77307:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"}},77952:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"}},60283:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"}},20854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"}},19273:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"}},54067:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(45799))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},37431:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(95183))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},67996:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(48138))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},42547:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(86266))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},74337:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(92018))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},40753:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(83482))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},26937:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(67701))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},42461:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(77998))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},67039:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(3855))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},29918:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(42419))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},94354:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(46564))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},93201:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(34106))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},68229:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(7500))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},628:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(4851))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},67638:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(86994))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},92790:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(82410))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},48794:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(94873))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},39936:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(65848))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},68287:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(n=r(34463))&&n.__esModule?n:{default:n};t.default=i,e.exports=i},6445:(e,t,r)=>{"use strict";r.d(t,{Z:()=>I});var n=r(1413),i=r(29439),o=r(4942),a=r(45987),s=r(67294),u=r(94184),l=r.n(u);const c=(0,s.createContext)({});var f=r(71002),d=r(92138),h=r(80334),p=r(98924),m="rc-util-key";function g(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function v(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,p.Z)())return null;var n,i=document.createElement("style");(null===(t=r.csp)||void 0===t?void 0:t.nonce)&&(i.nonce=null===(n=r.csp)||void 0===n?void 0:n.nonce);i.innerHTML=e;var o=g(r),a=o.firstChild;return r.prepend&&o.prepend?o.prepend(i):r.prepend&&a?o.insertBefore(i,a):o.appendChild(i),i}var y=new Map;function b(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=g(r);if(!y.has(n)){var i=v("",r),o=i.parentNode;y.set(n,o),o.removeChild(i)}var a=Array.from(y.get(n).children).find((function(e){return"STYLE"===e.tagName&&e[m]===t}));if(a){var s,u,l;if((null===(s=r.csp)||void 0===s?void 0:s.nonce)&&a.nonce!==(null===(u=r.csp)||void 0===u?void 0:u.nonce))a.nonce=null===(l=r.csp)||void 0===l?void 0:l.nonce;return a.innerHTML!==e&&(a.innerHTML=e),a}var c=v(e,r);return c[m]=t,c}function w(e){return"object"===(0,f.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,f.Z)(e.icon)||"function"==typeof e.icon)}function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){var n=e[r];if("class"===r)t.className=n,delete t.class;else t[r]=n;return t}),{})}function E(e,t,r){return r?s.createElement(e.tag,(0,n.Z)((0,n.Z)({key:t},_(e.attrs)),r),(e.children||[]).map((function(r,n){return E(r,"".concat(t,"-").concat(e.tag,"-").concat(n))}))):s.createElement(e.tag,(0,n.Z)({key:t},_(e.attrs)),(e.children||[]).map((function(r,n){return E(r,"".concat(t,"-").concat(e.tag,"-").concat(n))})))}function k(e){return(0,d.generate)(e)[0]}function C(e){return e?Array.isArray(e)?e:[e]:[]}var M="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",x=["icon","className","onClick","style","primaryColor","secondaryColor"],A={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var S=function(e){var t,r,i=e.icon,o=e.className,u=e.onClick,l=e.style,f=e.primaryColor,d=e.secondaryColor,p=(0,a.Z)(e,x),m=A;if(f&&(m={primaryColor:f,secondaryColor:d||k(f)}),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,t=(0,s.useContext)(c).csp;(0,s.useEffect)((function(){b(e,"@ant-design-icons",{prepend:!0,csp:t})}),[])}(),t=w(i),r="icon should be icon definiton, but got ".concat(i),(0,h.ZP)(t,"[@ant-design/icons] ".concat(r)),!w(i))return null;var g=i;return g&&"function"==typeof g.icon&&(g=(0,n.Z)((0,n.Z)({},g),{},{icon:g.icon(m.primaryColor,m.secondaryColor)})),E(g.icon,"svg-".concat(g.name),(0,n.Z)({className:o,onClick:u,style:l,"data-icon":g.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},p))};S.displayName="IconReact",S.getTwoToneColors=function(){return(0,n.Z)({},A)},S.setTwoToneColors=function(e){var t=e.primaryColor,r=e.secondaryColor;A.primaryColor=t,A.secondaryColor=r||k(t),A.calculated=!!r};const O=S;function P(e){var t=C(e),r=(0,i.Z)(t,2),n=r[0],o=r[1];return O.setTwoToneColors({primaryColor:n,secondaryColor:o})}var N=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];P("#1890ff");var T=s.forwardRef((function(e,t){var r,u=e.className,f=e.icon,d=e.spin,h=e.rotate,p=e.tabIndex,m=e.onClick,g=e.twoToneColor,v=(0,a.Z)(e,N),y=s.useContext(c).prefixCls,b=void 0===y?"anticon":y,w=l()(b,(r={},(0,o.Z)(r,"".concat(b,"-").concat(f.name),!!f.name),(0,o.Z)(r,"".concat(b,"-spin"),!!d||"loading"===f.name),r),u),_=p;void 0===_&&m&&(_=-1);var E=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,k=C(g),M=(0,i.Z)(k,2),x=M[0],A=M[1];return s.createElement("span",(0,n.Z)((0,n.Z)({role:"img","aria-label":f.name},v),{},{ref:t,tabIndex:_,onClick:m,className:w}),s.createElement(O,{icon:f,primaryColor:x,secondaryColor:A,style:E}))}));T.displayName="AntdIcon",T.getTwoToneColor=function(){var e=O.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},T.setTwoToneColor=P;const I=T},54549:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(1413),i=r(67294);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};var a=r(6445),s=function(e,t){return i.createElement(a.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:o}))};s.displayName="CloseOutlined";const u=i.forwardRef(s)},7085:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(1413),i=r(67294);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var a=r(6445),s=function(e,t){return i.createElement(a.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:o}))};s.displayName="LoadingOutlined";const u=i.forwardRef(s)},92074:(e,t,r)=>{"use strict";var n=r(95318),i=r(20862);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(81109)),a=n(r(63038)),s=n(r(59713)),u=n(r(6479)),l=i(r(67294)),c=n(r(94184)),f=n(r(98399)),d=n(r(95160)),h=r(46768),p=r(72479),m=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];(0,h.setTwoToneColor)("#1890ff");var g=l.forwardRef((function(e,t){var r,n=e.className,i=e.icon,h=e.spin,g=e.rotate,v=e.tabIndex,y=e.onClick,b=e.twoToneColor,w=(0,u.default)(e,m),_=l.useContext(f.default).prefixCls,E=void 0===_?"anticon":_,k=(0,c.default)(E,(r={},(0,s.default)(r,"".concat(E,"-").concat(i.name),!!i.name),(0,s.default)(r,"".concat(E,"-spin"),!!h||"loading"===i.name),r),n),C=v;void 0===C&&y&&(C=-1);var M=g?{msTransform:"rotate(".concat(g,"deg)"),transform:"rotate(".concat(g,"deg)")}:void 0,x=(0,p.normalizeTwoToneColors)(b),A=(0,a.default)(x,2),S=A[0],O=A[1];return l.createElement("span",(0,o.default)((0,o.default)({role:"img","aria-label":i.name},w),{},{ref:t,tabIndex:C,onClick:y,className:k}),l.createElement(d.default,{icon:i,primaryColor:S,secondaryColor:O,style:M}))}));g.displayName="AntdIcon",g.getTwoToneColor=h.getTwoToneColor,g.setTwoToneColor=h.setTwoToneColor;var v=g;t.default=v},98399:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(67294).createContext)({});t.default=n},95160:(e,t,r)=>{"use strict";var n=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(6479)),o=n(r(81109)),a=r(72479),s=["icon","className","onClick","style","primaryColor","secondaryColor"],u={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var l=function(e){var t=e.icon,r=e.className,n=e.onClick,l=e.style,c=e.primaryColor,f=e.secondaryColor,d=(0,i.default)(e,s),h=u;if(c&&(h={primaryColor:c,secondaryColor:f||(0,a.getSecondaryColor)(c)}),(0,a.useInsertStyles)(),(0,a.warning)((0,a.isIconDefinition)(t),"icon should be icon definiton, but got ".concat(t)),!(0,a.isIconDefinition)(t))return null;var p=t;return p&&"function"==typeof p.icon&&(p=(0,o.default)((0,o.default)({},p),{},{icon:p.icon(h.primaryColor,h.secondaryColor)})),(0,a.generate)(p.icon,"svg-".concat(p.name),(0,o.default)({className:r,onClick:n,style:l,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d))};l.displayName="IconReact",l.getTwoToneColors=function(){return(0,o.default)({},u)},l.setTwoToneColors=function(e){var t=e.primaryColor,r=e.secondaryColor;u.primaryColor=t,u.secondaryColor=r||(0,a.getSecondaryColor)(t),u.calculated=!!r};var c=l;t.default=c},46768:(e,t,r)=>{"use strict";var n=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.setTwoToneColor=function(e){var t=(0,a.normalizeTwoToneColors)(e),r=(0,i.default)(t,2),n=r[0],s=r[1];return o.default.setTwoToneColors({primaryColor:n,secondaryColor:s})},t.getTwoToneColor=function(){var e=o.default.getTwoToneColors();if(!e.calculated)return e.primaryColor;return[e.primaryColor,e.secondaryColor]};var i=n(r(63038)),o=n(r(95160)),a=r(72479)},45799:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(25413)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="BarsOutlined";var c=a.forwardRef(l);t.default=c},95183:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(85368)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CheckCircleFilled";var c=a.forwardRef(l);t.default=c},48138:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(16976)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CheckCircleOutlined";var c=a.forwardRef(l);t.default=c},86266:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(67303)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CloseCircleFilled";var c=a.forwardRef(l);t.default=c},92018:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(77384)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CloseCircleOutlined";var c=a.forwardRef(l);t.default=c},83482:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(79203)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CloseOutlined";var c=a.forwardRef(l);t.default=c},67701:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(33282)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="EllipsisOutlined";var c=a.forwardRef(l);t.default=c},77998:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(78515)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="ExclamationCircleFilled";var c=a.forwardRef(l);t.default=c},3855:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(34950)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="ExclamationCircleOutlined";var c=a.forwardRef(l);t.default=c},42419:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(13864)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="EyeOutlined";var c=a.forwardRef(l);t.default=c},46564:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(15369)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="InfoCircleFilled";var c=a.forwardRef(l);t.default=c},34106:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(20702)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="InfoCircleOutlined";var c=a.forwardRef(l);t.default=c},7500:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(6594)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="LeftOutlined";var c=a.forwardRef(l);t.default=c},4851:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(25828)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="LoadingOutlined";var c=a.forwardRef(l);t.default=c},86994:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(77307)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="RightOutlined";var c=a.forwardRef(l);t.default=c},82410:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(77952)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="RotateLeftOutlined";var c=a.forwardRef(l);t.default=c},94873:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(60283)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="RotateRightOutlined";var c=a.forwardRef(l);t.default=c},65848:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(20854)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="ZoomInOutlined";var c=a.forwardRef(l);t.default=c},34463:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(81109)),a=n(r(67294)),s=i(r(19273)),u=i(r(92074)),l=function(e,t){return a.createElement(u.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="ZoomOutOutlined";var c=a.forwardRef(l);t.default=c},72479:(e,t,r)=>{"use strict";var n=r(20862),i=r(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.warning=function(e,t){(0,l.default)(e,"[@ant-design/icons] ".concat(t))},t.isIconDefinition=function(e){return"object"===(0,a.default)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,a.default)(e.icon)||"function"==typeof e.icon)},t.normalizeAttrs=d,t.generate=function e(t,r,n){if(!n)return u.default.createElement(t.tag,(0,o.default)({key:r},d(t.attrs)),(t.children||[]).map((function(n,i){return e(n,"".concat(r,"-").concat(t.tag,"-").concat(i))})));return u.default.createElement(t.tag,(0,o.default)((0,o.default)({key:r},d(t.attrs)),n),(t.children||[]).map((function(n,i){return e(n,"".concat(r,"-").concat(t.tag,"-").concat(i))})))},t.getSecondaryColor=function(e){return(0,s.generate)(e)[0]},t.normalizeTwoToneColors=function(e){if(!e)return[];return Array.isArray(e)?e:[e]},t.useInsertStyles=t.iconStyles=t.svgBaseProps=void 0;var o=i(r(81109)),a=i(r(50008)),s=r(92138),u=n(r(67294)),l=i(r(45520)),c=r(93399),f=i(r(98399));function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){var n=e[r];if("class"===r)t.className=n,delete t.class;else t[r]=n;return t}),{})}t.svgBaseProps={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"};var h="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";t.iconStyles=h;t.useInsertStyles=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=(0,u.useContext)(f.default),r=t.csp;(0,u.useEffect)((function(){(0,c.updateCSS)(e,"@ant-design-icons",{prepend:!0,csp:r})}),[])}},67228:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},23646:(e,t,r)=>{var n=r(67228);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},81506:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},34575:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},93913:e=>{function t(e,t){for(var r=0;r{var n=r(29754),i=r(57067),o=r(78585);e.exports=function(e){var t=i();return function(){var r,i=n(e);if(t){var a=n(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return o(this,r)}},e.exports.default=e.exports,e.exports.__esModule=!0},59713:e=>{e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},67154:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,t(r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},2205:(e,t,r)=>{var n=r(99489);e.exports=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}}),t&&n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},95318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},20862:(e,t,r)=>{var n=r(50008).default;function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=a?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(o,s,u):o[s]=e[s]}return o.default=e,r&&r.set(e,o),o},e.exports.default=e.exports,e.exports.__esModule=!0},57067:e=>{e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0},46860:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},13884:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}},e.exports.default=e.exports,e.exports.__esModule=!0},80521:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},98206:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},81109:(e,t,r)=>{var n=r(59713);function i(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}e.exports=function(e){for(var t=1;t{var n=r(37316);e.exports=function(e,t){if(null==e)return{};var r,i,o=n(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o},e.exports.default=e.exports,e.exports.__esModule=!0},37316:e=>{e.exports=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i},e.exports.default=e.exports,e.exports.__esModule=!0},78585:(e,t,r)=>{var n=r(50008).default,i=r(81506);e.exports=function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.default=e.exports,e.exports.__esModule=!0},99489:e=>{function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(r,n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},63038:(e,t,r)=>{var n=r(22858),i=r(13884),o=r(60379),a=r(80521);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},319:(e,t,r)=>{var n=r(23646),i=r(46860),o=r(60379),a=r(98206);e.exports=function(e){return n(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},50008:e=>{function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},60379:(e,t,r)=>{var n=r(67228);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},61553:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),a=new S(n||[]);return o._invoke=function(e,t,r){var n=f;return function(i,o){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return P()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=M(a,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=c(e,t,r);if("normal"===u.type){if(n=r.done?p:d,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",m={};function g(){}function v(){}function y(){}var b={};u(b,o,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(O([])));_&&_!==r&&n.call(_,o)&&(b=_);var E=y.prototype=g.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,a,s){var u=c(e[i],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function M(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,M(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function O(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},87757:(e,t,r)=>{e.exports=r(61553)},86500:(e,t,r)=>{"use strict";r.d(t,{rW:()=>i,lC:()=>o,ve:()=>s,py:()=>u,WE:()=>l,vq:()=>c,s:()=>f,GC:()=>d,Wl:()=>h,T6:()=>p,VD:()=>m,Yt:()=>g});var n=r(90279);function i(e,t,r){return{r:255*(0,n.sh)(e,255),g:255*(0,n.sh)(t,255),b:255*(0,n.sh)(r,255)}}function o(e,t,r){e=(0,n.sh)(e,255),t=(0,n.sh)(t,255),r=(0,n.sh)(r,255);var i=Math.max(e,t,r),o=Math.min(e,t,r),a=0,s=0,u=(i+o)/2;if(i===o)s=0,a=0;else{var l=i-o;switch(s=u>.5?l/(2-i-o):l/(i+o),i){case e:a=(t-r)/l+(t1&&(r-=1),r<1/6?e+6*r*(t-e):r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function s(e,t,r){var i,o,s;if(e=(0,n.sh)(e,360),t=(0,n.sh)(t,100),r=(0,n.sh)(r,100),0===t)o=r,s=r,i=r;else{var u=r<.5?r*(1+t):r+t-r*t,l=2*r-u;i=a(l,u,e+1/3),o=a(l,u,e),s=a(l,u,e-1/3)}return{r:255*i,g:255*o,b:255*s}}function u(e,t,r){e=(0,n.sh)(e,255),t=(0,n.sh)(t,255),r=(0,n.sh)(r,255);var i=Math.max(e,t,r),o=Math.min(e,t,r),a=0,s=i,u=i-o,l=0===i?0:u/i;if(i===o)a=0;else{switch(i){case e:a=(t-r)/u+(t>16,g:(65280&e)>>8,b:255&e}}},48701:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},1350:(e,t,r)=>{"use strict";r.d(t,{uA:()=>a,uz:()=>f,ky:()=>d});var n=r(86500),i=r(48701),o=r(90279);function a(e){var t={r:0,g:0,b:0},r=1,i=null,a=null,s=null,u=!1,l=!1;return"string"==typeof e&&(e=f(e)),"object"==typeof e&&(d(e.r)&&d(e.g)&&d(e.b)?(t=(0,n.rW)(e.r,e.g,e.b),u=!0,l="%"===String(e.r).substr(-1)?"prgb":"rgb"):d(e.h)&&d(e.s)&&d(e.v)?(i=(0,o.JX)(e.s),a=(0,o.JX)(e.v),t=(0,n.WE)(e.h,i,a),u=!0,l="hsv"):d(e.h)&&d(e.s)&&d(e.l)&&(i=(0,o.JX)(e.s),s=(0,o.JX)(e.l),t=(0,n.ve)(e.h,i,s),u=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=(0,o.Yq)(r),{ok:u,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var s="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",u="[\\s|\\(]+("+s+")[,|\\s]+("+s+")[,|\\s]+("+s+")\\s*\\)?",l="[\\s|\\(]+("+s+")[,|\\s]+("+s+")[,|\\s]+("+s+")[,|\\s]+("+s+")\\s*\\)?",c={CSS_UNIT:new RegExp(s),rgb:new RegExp("rgb"+u),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+u),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+u),hsva:new RegExp("hsva"+l),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function f(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(i.R[e])e=i.R[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var r=c.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=c.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=c.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=c.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=c.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=c.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=c.hex8.exec(e))?{r:(0,n.VD)(r[1]),g:(0,n.VD)(r[2]),b:(0,n.VD)(r[3]),a:(0,n.T6)(r[4]),format:t?"name":"hex8"}:(r=c.hex6.exec(e))?{r:(0,n.VD)(r[1]),g:(0,n.VD)(r[2]),b:(0,n.VD)(r[3]),format:t?"name":"hex"}:(r=c.hex4.exec(e))?{r:(0,n.VD)(r[1]+r[1]),g:(0,n.VD)(r[2]+r[2]),b:(0,n.VD)(r[3]+r[3]),a:(0,n.T6)(r[4]+r[4]),format:t?"name":"hex8"}:!!(r=c.hex3.exec(e))&&{r:(0,n.VD)(r[1]+r[1]),g:(0,n.VD)(r[2]+r[2]),b:(0,n.VD)(r[3]+r[3]),format:t?"name":"hex"}}function d(e){return Boolean(c.CSS_UNIT.exec(String(e)))}},79176:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TinyColor:()=>s,bounds:()=>b,convertDecimalToHex:()=>n.Wl,convertHexToDecimal:()=>n.T6,default:()=>w,fromRatio:()=>h,hslToRgb:()=>n.ve,hsvToRgb:()=>n.WE,inputToRGB:()=>o.uA,isReadable:()=>c,isValidCSSUnit:()=>o.ky,legacyRandom:()=>p,mostReadable:()=>f,names:()=>i.R,numberInputToObject:()=>n.Yt,parseIntFromHex:()=>n.VD,random:()=>m,readability:()=>l,rgbToHex:()=>n.vq,rgbToHsl:()=>n.lC,rgbToHsv:()=>n.py,rgbToRgb:()=>n.rW,rgbaToArgbHex:()=>n.GC,rgbaToHex:()=>n.s,stringInputToObject:()=>o.uz,tinycolor:()=>u,toMsFilter:()=>d});var n=r(86500),i=r(48701),o=r(1350),a=r(90279),s=function(){function e(t,r){var i;if(void 0===t&&(t=""),void 0===r&&(r={}),t instanceof e)return t;"number"==typeof t&&(t=(0,n.Yt)(t)),this.originalInput=t;var a=(0,o.uA)(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(i=r.format)&&void 0!==i?i:a.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,r=e.g/255,n=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=(0,a.Yq)(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var e=(0,n.py)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=(0,n.py)(this.r,this.g,this.b),t=Math.round(360*e.h),r=Math.round(100*e.s),i=Math.round(100*e.v);return 1===this.a?"hsv("+t+", "+r+"%, "+i+"%)":"hsva("+t+", "+r+"%, "+i+"%, "+this.roundA+")"},e.prototype.toHsl=function(){var e=(0,n.lC)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=(0,n.lC)(this.r,this.g,this.b),t=Math.round(360*e.h),r=Math.round(100*e.s),i=Math.round(100*e.l);return 1===this.a?"hsl("+t+", "+r+"%, "+i+"%)":"hsla("+t+", "+r+"%, "+i+"%, "+this.roundA+")"},e.prototype.toHex=function(e){return void 0===e&&(e=!1),(0,n.vq)(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),(0,n.s)(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return 1===this.a?"rgb("+e+", "+t+", "+r+")":"rgba("+e+", "+t+", "+r+", "+this.roundA+")"},e.prototype.toPercentageRgb=function(){var e=function(e){return Math.round(100*(0,a.sh)(e,255))+"%"};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*(0,a.sh)(e,255))};return 1===this.a?"rgb("+e(this.r)+"%, "+e(this.g)+"%, "+e(this.b)+"%)":"rgba("+e(this.r)+"%, "+e(this.g)+"%, "+e(this.b)+"%, "+this.roundA+")"},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+(0,n.vq)(this.r,this.g,this.b,!1),t=0,r=Object.entries(i.R);t=0;return t||!n||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=(0,a.V2)(r.l),new e(r)},e.prototype.brighten=function(t){void 0===t&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),new e(r)},e.prototype.darken=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=(0,a.V2)(r.l),new e(r)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=(0,a.V2)(r.s),new e(r)},e.prototype.saturate=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=(0,a.V2)(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){void 0===r&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),o=r/100;return new e({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},e.prototype.analogous=function(t,r){void 0===t&&(t=6),void 0===r&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(new e({h:n,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb();return new e({r:n.r+(r.r-n.r)*r.a,g:n.g+(r.g-n.g)*r.a,b:n.b+(r.b-n.b)*r.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],o=360/t,a=1;a=4.5;case"AAlarge":return o>=3;case"AAAsmall":return o>=7;default:return!1}}function f(e,t,r){void 0===r&&(r={includeFallbackColors:!1,level:"AA",size:"small"});for(var n=null,i=0,o=r.includeFallbackColors,a=r.level,u=r.size,d=0,h=t;di&&(i=m,n=new s(p))}return c(e,n,{level:a,size:u})||!o?n:(r.includeFallbackColors=!1,f(e,["#fff","#000"],r))}function d(e,t){var r=new s(e),i="#"+(0,n.GC)(r.r,r.g,r.b,r.a),o=i,a=r.gradientType?"GradientType = 1, ":"";if(t){var u=new s(t);o="#"+(0,n.GC)(u.r,u.g,u.b,u.a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+i+",endColorstr="+o+")"}function h(e,t){var r={r:(0,a.JX)(e.r),g:(0,a.JX)(e.g),b:(0,a.JX)(e.b)};return void 0!==e.a&&(r.a=Number(e.a)),new s(r,t)}function p(){return new s({r:Math.random(),g:Math.random(),b:Math.random()})}function m(e){if(void 0===e&&(e={}),void 0!==e.count&&null!==e.count){var t=e.count,r=[];for(e.count=void 0;t>r.length;)e.count=null,e.seed&&(e.seed+=1),r.push(m(e));return e.count=t,r}var n=function(e,t){var r=v(function(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if("string"==typeof e){var r=b.find((function(t){return t.name===e}));if(r){var n=y(r);if(n.hueRange)return n.hueRange}var i=new s(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}(e),t);r<0&&(r=360+r);return r}(e.hue,e.seed),i=function(e,t){if("monochrome"===t.hue)return 0;if("random"===t.luminosity)return v([0,100],t.seed);var r=g(e).saturationRange,n=r[0],i=r[1];switch(t.luminosity){case"bright":n=55;break;case"dark":n=i-10;break;case"light":i=55}return v([n,i],t.seed)}(n,e),o=function(e,t,r){var n=function(e,t){for(var r=g(e).lowerBounds,n=0;n=i&&t<=a){var u=(s-o)/(a-i);return u*t+(o-u*i)}}return 0}(e,t),i=100;switch(r.luminosity){case"dark":i=n+20;break;case"light":n=(i+n)/2;break;case"random":n=0,i=100}return v([n,i],r.seed)}(n,i,e),a={h:n,s:i,v:o};return void 0!==e.alpha&&(a.a=e.alpha),new s(a)}function g(e){e>=334&&e<=360&&(e-=360);for(var t=0,r=b;t=n.hueRange[0]&&e<=n.hueRange[1])return n}throw Error("Color not found")}function v(e,t){if(void 0===t)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var r=e[1]||1,n=e[0]||0,i=(t=(9301*t+49297)%233280)/233280;return Math.floor(n+i*(r-n))}function y(e){var t=e.lowerBounds[0][0],r=e.lowerBounds[e.lowerBounds.length-1][0],n=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,r],brightnessRange:[n,i]}}var b=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];const w=u},90279:(e,t,r)=>{"use strict";function n(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function i(e){return Math.min(1,Math.max(0,e))}function o(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function a(e){return e<=1?100*Number(e)+"%":e}function s(e){return 1===e.length?"0"+e:String(e)}r.d(t,{sh:()=>n,V2:()=>i,Yq:()=>o,JX:()=>a,FZ:()=>s})},34901:(e,t,r)=>{"use strict";r.d(t,{J:()=>w,c:()=>_});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 u=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,c;!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"}(c||(c={}));const f="0123456789abcdef";class d{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(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=f[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){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 c.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 c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.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,d.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"),u&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.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",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new d("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?a=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=c,d.levels=l;const h=new d("bytes/5.7.0");function p(e){return!!e.toHexString}function m(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return m(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function g(e){return"number"==typeof e&&e==e&&e%1==0}function v(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!g(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function y(e,t){if(t||(t={}),"number"==typeof e){h.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),m(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),p(e)&&(e=e.toHexString()),b(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":h.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;e{"use strict";r.r(t),r.d(t,{decode:()=>n.J,encode:()=>n.c});var n=r(34901)},9279:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});const n="0x0000000000000000000000000000000000000000"},46599:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>$t,Contract:()=>Qt,ContractFactory:()=>Yt});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 u=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,c;!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"}(c||(c={}));const f="0123456789abcdef";class d{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(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=f[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){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 c.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 c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.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,d.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"),u&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.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",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new d("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?a=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=c,d.levels=l;const h=new d("bytes/5.7.0");function p(e){return!!e.toHexString}function m(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return m(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function g(e){return _(e)&&!(e.length%2)||y(e)}function v(e){return"number"==typeof e&&e==e&&e%1==0}function y(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!v(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function b(e,t){if(t||(t={}),"number"==typeof e){h.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),m(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),p(e)&&(e=e.toHexString()),_(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":h.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;eb(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),m(n)}function _(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const E="0123456789abcdef";function k(e,t){if(t||(t={}),"number"==typeof e){h.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=E[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),p(e))return e.toHexString();if(_(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":h.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(y(e)){let t="0x";for(let r=0;r>4]+E[15&n]}return t}return h.throwArgumentError("invalid hexlify value","value",e)}function C(e,t,r){return"string"!=typeof e?e=k(e):(!_(e)||e.length%2)&&h.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function M(e,t){for("string"!=typeof e?e=k(e):_(e)||h.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&h.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}var x=r(5039);var A=r.n(x)().BN;const S=new d("bignumber/5.7.0"),O={},P=9007199254740991;let N=!1;class T{constructor(e,t){e!==O&&S.throwError("cannot call constructor directly; use BigNumber.from",d.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return R(B(this).fromTwos(e))}toTwos(e){return R(B(this).toTwos(e))}abs(){return"-"===this._hex[0]?T.from(this._hex.substring(1)):this}add(e){return R(B(this).add(B(e)))}sub(e){return R(B(this).sub(B(e)))}div(e){return T.from(e).isZero()&&L("division-by-zero","div"),R(B(this).div(B(e)))}mul(e){return R(B(this).mul(B(e)))}mod(e){const t=B(e);return t.isNeg()&&L("division-by-zero","mod"),R(B(this).umod(t))}pow(e){const t=B(e);return t.isNeg()&&L("negative-power","pow"),R(B(this).pow(t))}and(e){const t=B(e);return(this.isNegative()||t.isNeg())&&L("unbound-bitwise-result","and"),R(B(this).and(t))}or(e){const t=B(e);return(this.isNegative()||t.isNeg())&&L("unbound-bitwise-result","or"),R(B(this).or(t))}xor(e){const t=B(e);return(this.isNegative()||t.isNeg())&&L("unbound-bitwise-result","xor"),R(B(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&L("negative-width","mask"),R(B(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&L("negative-width","shl"),R(B(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&L("negative-width","shr"),R(B(this).shrn(e))}eq(e){return B(this).eq(B(e))}lt(e){return B(this).lt(B(e))}lte(e){return B(this).lte(B(e))}gt(e){return B(this).gt(B(e))}gte(e){return B(this).gte(B(e))}isNegative(){return"-"===this._hex[0]}isZero(){return B(this).isZero()}toNumber(){try{return B(this).toNumber()}catch(e){L("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return S.throwError("this platform does not support BigInt",d.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?N||(N=!0,S.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?S.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",d.errors.UNEXPECTED_ARGUMENT,{}):S.throwError("BigNumber.toString does not accept parameters",d.errors.UNEXPECTED_ARGUMENT,{})),B(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof T)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new T(O,I(e)):e.match(/^-?[0-9]+$/)?new T(O,I(new A(e))):S.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&L("underflow","BigNumber.from",e),(e>=P||e<=-P)&&L("overflow","BigNumber.from",e),T.from(String(e));const t=e;if("bigint"==typeof t)return T.from(t.toString());if(y(t))return T.from(k(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return T.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(_(e)||"-"===e[0]&&_(e.substring(1))))return T.from(e)}return S.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function I(e){if("string"!=typeof e)return I(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&S.throwArgumentError("invalid hex","value",e),"0x00"===(e=I(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 R(e){return T.from(I(e))}function B(e){const t=T.from(e).toHexString();return"-"===t[0]?new A("-"+t.substring(3),16):new A(t.substring(2),16)}function L(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),S.throwError(e,d.errors.NUMERIC_FAULT,n)}var j=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const D=new d("properties/5.7.0");function F(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function U(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 z(e){return j(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 q(e){const t={};for(const r in e)t[r]=e[r];return t}const V={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function H(e){if(null==e||V[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;rZ(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&F(t,r,Z(n))}return t}return D.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function Z(e){return G(e)}class W{constructor(e){for(const t in e)this[t]=Z(e[t])}}const K="abi/5.7.0",$=new d(K);class Q{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){$.throwArgumentError(e,this.localName,t)}}class Y{constructor(e){F(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return function(e){let t="0x";return e.forEach((e=>{t+=k(e).substring(2)})),t}(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(w(e._data))}writeBytes(e){let t=b(e);const r=t.length%this.wordSize;return r&&(t=w([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=b(T.from(e));return t.length>this.wordSize&&$.throwError("value out-of-bounds",d.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=w([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 J{constructor(e,t,r,n){F(this,"_data",b(e)),F(this,"wordSize",t||32),F(this,"_coerceFunc",r),F(this,"allowLoose",n),this._offset=0}get data(){return k(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):J.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:$.throwError("data out-of-bounds",d.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new J(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 T.from(this.readBytes(this.wordSize))}}var X=r(91094),ee=r.n(X);function te(e){return"0x"+ee().keccak_256(b(e))}const re=new d("rlp/5.7.0");function ne(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function ie(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(ie(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=ne(t.length);return r.unshift(247+r.length),r.concat(t)}g(e)||re.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call(b(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=ne(t.length);return r.unshift(183+r.length),r.concat(t)}function oe(e){return k(ie(e))}const ae=new d("address/5.7.0");function se(e){_(e,20)||ae.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=b(te(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const ue={};for(let e=0;e<10;e++)ue[String(e)]=String(e);for(let e=0;e<26;e++)ue[String.fromCharCode(65+e)]=String(10+e);const le=Math.floor((ce=9007199254740991,Math.log10?Math.log10(ce):Math.log(ce)/Math.LN10));var ce;function fe(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>ue[e])).join("");for(;t.length>=le;){let e=t.substring(0,le);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 de(e){let t=null;if("string"!=typeof e&&ae.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=se(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&ae.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)!==fe(e)&&ae.throwArgumentError("bad icap checksum","address",e),r=e.substring(4),t=new A(r,36).toString(16);t.length<40;)t="0"+t;t=se("0x"+t)}else ae.throwArgumentError("invalid address","address",e);var r;return t}function he(e){let t=null;try{t=de(e.from)}catch(t){ae.throwArgumentError("missing from address","transaction",e)}return de(C(te(oe([t,function(e){let t=b(e);if(0===t.length)return t;let r=0;for(;r>6==2;n++)e++;return e}return e===ge.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(me||(me={})),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"}(ge||(ge={}));const ye=Object.freeze({error:function(e,t,r,n,i){return pe.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:ve,replace:function(e,t,r,n,i){return e===ge.OVERLONG?(n.push(i),0):(n.push(65533),ve(e,t,r))}});function be(e,t){null==t&&(t=ye.error),e=b(e);const r=[];let n=0;for(;n>7==0){r.push(i);continue}let o=null,a=null;if(192==(224&i))o=1,a=127;else if(224==(240&i))o=2,a=2047;else{if(240!=(248&i)){n+=t(128==(192&i)?ge.UNEXPECTED_CONTINUE:ge.BAD_PREFIX,n-1,e,r);continue}o=3,a=65535}if(n-1+o>=e.length){n+=t(ge.OVERRUN,n-1,e,r);continue}let s=i&(1<<8-o-1)-1;for(let i=0;i1114111?n+=t(ge.OUT_OF_RANGE,n-1-o,e,r,s):s>=55296&&s<=57343?n+=t(ge.UTF16_SURROGATE,n-1-o,e,r,s):s<=a?n+=t(ge.OVERLONG,n-1-o,e,r,s):r.push(s))}return r}function we(e,t=me.current){t!=me.current&&(pe.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<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(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return b(r)}function _e(e,t){return be(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function Ee(e){return te(we(e))}class ke extends Q{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=de(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return de(M(e.readValue().toHexString(),20))}}class Ce extends Q{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 Me=new d(K);function xe(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||Me.throwError("cannot encode object for signature with missing names",d.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&Me.throwError("cannot encode object for signature with duplicate names",d.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else Me.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&Me.throwArgumentError("types/value length mismatch","tuple",r);let i=new Y(e.wordSize),o=new Y(e.wordSize),a=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=o.length;e.encode(o,r);let n=i.writeUpdatableValue();a.push((e=>{n(e+t)}))}else e.encode(i,r)})),a.forEach((e=>{e(i.length)}));let s=e.appendWriter(i);return s+=e.appendWriter(o),s}function Ae(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),o=n.subReader(r.toNumber());try{i=t.decode(o)}catch(e){if(e.code===d.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===d.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=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 e=0;e{throw t}})}return Object.freeze(r)}class Se extends Q{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&&Me.throwError("insufficient data length",d.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e{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 xe(e,this.coders,t)}decode(e){return e.coerce(this.name,Ae(e,this.coders))}}const ze=new d(K),qe={};let Ve={calldata:!0,memory:!0,storage:!0},He={calldata:!0,memory:!0};function Ge(e,t){if("bytes"===e||"string"===e){if(Ve[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&He[t])return!0;return(Ve[t]||"payable"===t)&&ze.throwArgumentError("invalid modifier","name",t),!1}function Ze(e,t){for(let r in t)F(e,r,t[r])}const We=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Ke=new RegExp(/^(.*)\[([0-9]*)\]$/);class $e{constructor(e,t){e!==qe&&ze.throwError("use fromString",d.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Ze(this,t);let r=this.type.match(Ke);Ze(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:$e.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=We.sighash),We[e]||ze.throwArgumentError("invalid format type","format",e),e===We.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!==We.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===We.full?", ":",")+")"):t+=this.type,e!==We.sighash&&(!0===this.indexed&&(t+=" indexed"),e===We.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?$e.fromString(e,t):$e.fromObject(e)}static fromObject(e){return $e.isParamType(e)?e:new $e(qe,{name:e.name||null,type:at(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map($e.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){ze.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 r=0;r$e.fromString(e,t)))}class Ye{constructor(e,t){e!==qe&&ze.throwError("use a static from method",d.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ze(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Ye.isFragment(e)?e:"string"==typeof e?Ye.fromString(e):Ye.fromObject(e)}static fromObject(e){if(Ye.isFragment(e))return e;switch(e.type){case"function":return nt.fromObject(e);case"event":return Je.fromObject(e);case"constructor":return rt.fromObject(e);case"error":return ot.fromObject(e);case"fallback":case"receive":return null}return ze.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]?Je.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?nt.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?rt.fromString(e.trim()):"error"===e.split(" ")[0]?ot.fromString(e.substring(5).trim()):ze.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class Je extends Ye{format(e){if(e||(e=We.sighash),We[e]||ze.throwArgumentError("invalid format type","format",e),e===We.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!==We.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===We.full?", ":",")+") ",e!==We.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?Je.fromString(e):Je.fromObject(e)}static fromObject(e){if(Je.isEventFragment(e))return e;"event"!==e.type&&ze.throwArgumentError("invalid event object","value",e);const t={name:ut(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map($e.fromObject):[],type:"event"};return new Je(qe,t)}static fromString(e){let t=e.match(lt);t||ze.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:ze.warn("unknown modifier: "+e)}})),Je.fromObject({name:t[1].trim(),anonymous:r,inputs:Qe(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function Xe(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&ze.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||ze.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=T.from(r[1]),r[0]):e}function et(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 tt(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&&ze.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&ze.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||ze.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&&ze.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&&ze.throwArgumentError("unable to determine stateMutability","value",e),t}class rt extends Ye{format(e){if(e||(e=We.sighash),We[e]||ze.throwArgumentError("invalid format type","format",e),e===We.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===We.sighash&&ze.throwError("cannot format a constructor for sighash",d.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===We.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?rt.fromString(e):rt.fromObject(e)}static fromObject(e){if(rt.isConstructorFragment(e))return e;"constructor"!==e.type&&ze.throwArgumentError("invalid constructor object","value",e);let t=tt(e);t.constant&&ze.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map($e.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?T.from(e.gas):null};return new rt(qe,r)}static fromString(e){let t={type:"constructor"},r=(e=Xe(e,t)).match(lt);return r&&"constructor"===r[1].trim()||ze.throwArgumentError("invalid constructor string","value",e),t.inputs=Qe(r[2].trim(),!1),et(r[3].trim(),t),rt.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class nt extends rt{format(e){if(e||(e=We.sighash),We[e]||ze.throwArgumentError("invalid format type","format",e),e===We.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!==We.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===We.full?", ":",")+") ",e!==We.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?nt.fromString(e):nt.fromObject(e)}static fromObject(e){if(nt.isFunctionFragment(e))return e;"function"!==e.type&&ze.throwArgumentError("invalid function object","value",e);let t=tt(e);const r={type:e.type,name:ut(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map($e.fromObject):[],outputs:e.outputs?e.outputs.map($e.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?T.from(e.gas):null};return new nt(qe,r)}static fromString(e){let t={type:"function"},r=(e=Xe(e,t)).split(" returns ");r.length>2&&ze.throwArgumentError("invalid function string","value",e);let n=r[0].match(lt);if(n||ze.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&ut(t.name),t.inputs=Qe(n[2],!1),et(n[3].trim(),t),r.length>1){let n=r[1].match(lt);""==n[1].trim()&&""==n[3].trim()||ze.throwArgumentError("unexpected tokens","value",e),t.outputs=Qe(n[2],!1)}else t.outputs=[];return nt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function it(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||ze.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class ot extends Ye{format(e){if(e||(e=We.sighash),We[e]||ze.throwArgumentError("invalid format type","format",e),e===We.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==We.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===We.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?ot.fromString(e):ot.fromObject(e)}static fromObject(e){if(ot.isErrorFragment(e))return e;"error"!==e.type&&ze.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:ut(e.name),inputs:e.inputs?e.inputs.map($e.fromObject):[]};return it(new ot(qe,t))}static fromString(e){let t={type:"error"},r=e.match(lt);return r||ze.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&ut(t.name),t.inputs=Qe(r[2],!1),it(ot.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function at(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const st=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function ut(e){return e&&e.match(st)||ze.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const lt=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const ct=new d(K),ft=new RegExp(/^bytes([0-9]*)$/),dt=new RegExp(/^(u?int)([0-9]*)$/);const ht=new class{constructor(e){F(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new ke(e.name);case"bool":return new Oe(e.name);case"string":return new Fe(e.name);case"bytes":return new Ne(e.name);case"array":return new Se(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Ue((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new Ie(e.name)}let t=e.type.match(dt);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&ct.throwArgumentError("invalid "+t[1]+" bit length","param",e),new De(r/8,"int"===t[1],e.name)}if(t=e.type.match(ft),t){let r=parseInt(t[1]);return(0===r||r>32)&&ct.throwArgumentError("invalid bytes length","param",e),new Te(r,e.name)}return ct.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new J(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new Y(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder($e.from(e))));return new Ue(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&ct.throwError("types/values length mismatch",d.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder($e.from(e)))),n=new Ue(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const n=e.map((e=>this._getCoder($e.from(e))));return new Ue(n,"_").decode(this._getReader(b(t),r))}},pt=new d(K);class mt extends W{}class gt extends W{}class vt extends W{}class yt extends W{static isIndexed(e){return!(!e||!e._isIndexed)}}const bt={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function wt(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class _t{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,F(this,"fragments",t.map((e=>Ye.from(e))).filter((e=>null!=e))),F(this,"_abiCoder",U(new.target,"getAbiCoder")()),F(this,"functions",{}),F(this,"errors",{}),F(this,"events",{}),F(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void pt.warn("duplicate definition - constructor"):void F(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]?pt.warn("duplicate definition - "+r):t[r]=e})),this.deploy||F(this,"deploy",rt.from({payable:!1,type:"constructor"})),F(this,"_isInterface",!0)}format(e){e||(e=We.full),e===We.sighash&&pt.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===We.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return ht}static getAddress(e){return de(e)}static getSighash(e){return C(Ee(e.format()),0,4)}static getEventTopic(e){return Ee(e.format())}getFunction(e){if(_(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];pt.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?pt.throwArgumentError("no matching function","name",t):r.length>1&&pt.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[nt.fromString(e).format()];return t||pt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(_(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];pt.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?pt.throwArgumentError("no matching event","name",t):r.length>1&&pt.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[Je.fromString(e).format()];return t||pt.throwArgumentError("no matching event","signature",e),t}getError(e){if(_(e)){const t=U(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}pt.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?pt.throwArgumentError("no matching error","name",t):r.length>1&&pt.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[nt.fromString(e).format()];return t||pt.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(e){throw t}}return U(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),U(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=b(t);return k(r.slice(0,4))!==this.getSighash(e)&&pt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",k(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),k(w([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=b(t);return k(r.slice(0,4))!==this.getSighash(e)&&pt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",k(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),k(w([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=b(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=k(r.slice(0,4)),t=bt[e];if(t)o=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.signature,t.reason&&(n=o[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const t=this.getError(e);o=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.format()}catch(e){}break}}return pt.throwError("call revert exception"+i,d.errors.CALL_EXCEPTION,{method:e.format(),data:k(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),k(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&pt.throwError("too many arguments for "+e.format(),d.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?Ee(t):"bytes"===e.type?te(k(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=T.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),M(k(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?pt.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&&pt.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&&pt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const a=t[o];if(e.indexed)if("string"===e.type)r.push(Ee(a));else if("bytes"===e.type)r.push(te(a));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[a]))}else n.push(e),i.push(a)})),{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);_(r[0],32)&&r[0].toLowerCase()===t||pt.throwError("fragment/topic mismatch",d.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],o=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push($e.fromObject({type:"bytes32",name:e.name})),o.push(!0)):(n.push(e),o.push(!1)):(i.push(e),o.push(!1))}));let a=null!=r?this._abiCoder.decode(n,w(r)):null,s=this._abiCoder.decode(i,t,!0),u=[],l=0,c=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==a)u[t]=new yt({_isIndexed:!0,hash:null});else if(o[t])u[t]=new yt({_isIndexed:!0,hash:a[c++]});else try{u[t]=a[c++]}catch(e){u[t]=e}else try{u[t]=s[l++]}catch(e){u[t]=e}if(e.name&&null==u[e.name]){const r=u[t];r instanceof Error?Object.defineProperty(u,e.name,{enumerable:!0,get:()=>{throw wt(`property ${JSON.stringify(e.name)}`,r)}}):u[e.name]=r}}));for(let e=0;e{throw wt(`index ${e}`,t)}})}return Object.freeze(u)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new gt({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:T.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new mt({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=k(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new vt({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)}}var Et=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const kt=new d("abstract-provider/5.7.0");class Ct{constructor(){kt.checkAbstract(new.target,Ct),F(this,"_isProvider",!0)}getFeeData(){return Et(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield z({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,n=null,i=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,i=T.from("1500000000"),n=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:i,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)}}var Mt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const xt=new d("abstract-signer/5.7.0"),At=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],St=[d.errors.INSUFFICIENT_FUNDS,d.errors.NONCE_EXPIRED,d.errors.REPLACEMENT_UNDERPRICED];class Ot{constructor(){xt.checkAbstract(new.target,Ot),F(this,"_isSigner",!0)}getBalance(e){return Mt(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return Mt(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return Mt(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield z(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return Mt(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield z(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return Mt(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 Mt(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return Mt(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return Mt(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return Mt(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===At.indexOf(t)&&xt.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=q(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()&&xt.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return Mt(this,void 0,void 0,(function*(){const t=yield z(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>Mt(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&xt.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||xt.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):xt.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&&xt.throwError("network does not support EIP-1559",d.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):xt.throwError("failed to get consistent fee data",d.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(St.indexOf(e.code)>=0)throw e;return xt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",d.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]&&xt.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield z(t)}))}_checkProvider(e){this.provider||xt.throwError("missing provider",d.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class Pt extends Ot{constructor(e,t){super(),F(this,"address",e),F(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{xt.throwError(e,d.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 Pt(this.address,e)}}const Nt=new d("transactions/5.7.0");var Tt;!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(Tt||(Tt={}));function It(e,t){return{address:de(e),storageKeys:(t||[]).map(((t,r)=>(32!==function(e){if("string"!=typeof e)e=k(e);else if(!_(e)||e.length%2)return null;return(e.length-2)/2}(t)&&Nt.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function Rt(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&Nt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),It(e[0],e[1])):It(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return It(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}var Bt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Lt=new d("contracts/5.7.0"),jt={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 Dt(e,t){return Bt(this,void 0,void 0,(function*(){const r=yield t;"string"!=typeof r&&Lt.throwArgumentError("invalid address or ENS name","name",r);try{return de(r)}catch(e){}e||Lt.throwError("a provider or signer is needed to resolve ENS names",d.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield e.resolveName(r);return null==n&&Lt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function Ft(e,t,r){return Bt(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>Ft(e,Array.isArray(t)?t[n]:t[r.name],r)))):"address"===r.type?yield Dt(e,t):"tuple"===r.type?yield Ft(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>Ft(e,t,r.arrayChildren)))):Promise.reject(Lt.makeError("invalid value for array",d.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function Ut(e,t,r){return Bt(this,void 0,void 0,(function*(){let n={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(n=q(r.pop())),Lt.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=z({override:Dt(e.signer,n.from),signer:e.signer.getAddress()}).then((e=>Bt(this,void 0,void 0,(function*(){return de(e.signer)!==e.override&&Lt.throwError("Contract with a Signer cannot override from",d.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):n.from=e.signer.getAddress():n.from&&(n.from=Dt(e.provider,n.from));const i=yield z({args:Ft(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:z(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),a={data:o,to:i.address},s=i.overrides;if(null!=s.nonce&&(a.nonce=T.from(s.nonce).toNumber()),null!=s.gasLimit&&(a.gasLimit=T.from(s.gasLimit)),null!=s.gasPrice&&(a.gasPrice=T.from(s.gasPrice)),null!=s.maxFeePerGas&&(a.maxFeePerGas=T.from(s.maxFeePerGas)),null!=s.maxPriorityFeePerGas&&(a.maxPriorityFeePerGas=T.from(s.maxPriorityFeePerGas)),null!=s.from&&(a.from=s.from),null!=s.type&&(a.type=s.type),null!=s.accessList&&(a.accessList=Rt(s.accessList)),null==a.gasLimit&&null!=t.gas){let e=21e3;const r=b(o);for(let t=0;tnull!=n[e]));return u.length&&Lt.throwError(`cannot override ${u.map((e=>JSON.stringify(e))).join(",")}`,d.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),a}))}function zt(e,t){const r=t.wait.bind(t);t.wait=t=>r(t).then((t=>(t.events=t.logs.map((r=>{let n=Z(r),i=null;try{i=e.interface.parseLog(r)}catch(e){}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 qt(e,t,r){const n=e.signer||e.provider;return function(...i){return Bt(this,void 0,void 0,(function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){const e=q(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));const a=yield Ut(e,t,i),s=yield n.call(a,o);try{let n=e.interface.decodeFunctionResult(t,s);return r&&1===t.outputs.length&&(n=n[0]),n}catch(t){throw t.code===d.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=a),t}}))}}function Vt(e,t,r){return t.constant?qt(e,t,r):function(e,t){return function(...r){return Bt(this,void 0,void 0,(function*(){e.signer||Lt.throwError("sending a transaction requires a signer",d.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield Ut(e,t,r),i=yield e.signer.sendTransaction(n);return zt(e,i),i}))}}(e,t)}function Ht(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((e=>Array.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class Gt{constructor(e,t){F(this,"tag",e),F(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 Zt extends Gt{constructor(){super("error",null)}}class Wt extends Gt{constructor(e,t,r,n){const i={address:e};let o=t.getEventTopic(r);n?(o!==n[0]&&Lt.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(Ht(i),i),F(this,"address",e),F(this,"interface",t),F(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=function(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class Kt extends Gt{constructor(e,t){super("*",{address:e}),F(this,"address",e),F(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(e){}}}class $t{constructor(e,t,r){F(this,"interface",U(new.target,"getInterface")(t)),null==r?(F(this,"provider",null),F(this,"signer",null)):Ot.isSigner(r)?(F(this,"provider",r.provider||null),F(this,"signer",r)):Ct.isProvider(r)?(F(this,"provider",r),F(this,"signer",null)):Lt.throwArgumentError("invalid signer or provider","signerOrProvider",r),F(this,"callStatic",{}),F(this,"estimateGas",{}),F(this,"functions",{}),F(this,"populateTransaction",{}),F(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const r=this.interface.events[t];F(this.filters,t,((...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)}))),e[r.name]||(e[r.name]=[]),e[r.name].push(t)})),Object.keys(e).forEach((t=>{const r=e[t];1===r.length?F(this.filters,t,this.filters[r[0]]):Lt.warn(`Duplicate definition of ${t} (${r.join(", ")})`)}))}if(F(this,"_runningEvents",{}),F(this,"_wrappedEmits",{}),null==e&&Lt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),F(this,"address",e),this.provider)F(this,"resolvedAddress",Dt(this.provider,e));else try{F(this,"resolvedAddress",Promise.resolve(de(e)))}catch(e){Lt.throwError("provider is required to use ENS name as contract address",d.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(i[e])Lt.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{i[e]=!0;{const r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}null==this[e]&&F(this,e,Vt(this,t,!0)),null==this.functions[e]&&F(this.functions,e,Vt(this,t,!1)),null==this.callStatic[e]&&F(this.callStatic,e,qt(this,t,!0)),null==this.populateTransaction[e]&&F(this.populateTransaction,e,function(e,t){return function(...r){return Ut(e,t,r)}}(this,t)),null==this.estimateGas[e]&&F(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return Bt(this,void 0,void 0,(function*(){r||Lt.throwError("estimate require a provider or signer",d.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Ut(e,t,n);return yield r.estimateGas(i)}))}}(this,t))}})),Object.keys(n).forEach((e=>{const t=n[e];if(t.length>1)return;e=e.substring(1);const r=t[0];try{null==this[e]&&F(this,e,this[r])}catch(e){}null==this.functions[e]&&F(this.functions,e,this.functions[r]),null==this.callStatic[e]&&F(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&F(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&F(this.estimateGas,e,this.estimateGas[r])}))}static getContractAddress(e){return he(e)}static getInterface(e){return _t.isInterface(e)?e:new _t(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&&Lt.throwError("contract not deployed",d.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||Lt.throwError("sending a transactions require a signer",d.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=q(e||{});return["from","to"].forEach((function(e){null!=t[e]&&Lt.throwError("cannot override "+e,d.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"==typeof e&&(e=new Pt(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&F(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return yt.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 Zt);if("event"===e)return this._normalizeRunningEvent(new Gt("event",null));if("*"===e)return this._normalizeRunningEvent(new Kt(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Wt(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 Wt(this.address,this.interface,r,e.topics))}catch(e){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Gt(Ht(t),t))}return this._normalizeRunningEvent(new Kt(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=Z(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||Lt.throwError("events require a provider or a signer with a provider",d.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(e){n.decodeError=e.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=q(n.filter);return"string"==typeof t&&_(t,32)?(null!=r&&Lt.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,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n}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 Qt extends $t{}class Yt{constructor(e,t,r){let n=null;n="string"==typeof t?t:y(t)?k(t):t&&"string"==typeof t.object?t.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!_(n)||n.length%2)&&Lt.throwArgumentError("invalid bytecode","bytecode",t),r&&!Ot.isSigner(r)&&Lt.throwArgumentError("invalid signer","signer",r),F(this,"bytecode",n),F(this,"interface",U(new.target,"getInterface")(e)),F(this,"signer",r||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=q(e.pop());for(const e in t)if(!jt[e])throw new Error("unknown transaction override "+e)}if(["data","from","to"].forEach((e=>{null!=t[e]&&Lt.throwError("cannot override "+e,d.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){T.from(t.value).isZero()||this.interface.deploy.payable||Lt.throwError("non-payable constructor cannot override value",d.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return Lt.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=k(w([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return Bt(this,void 0,void 0,(function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Lt.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield Ft(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),i=yield this.signer.sendTransaction(n),o=U(this.constructor,"getContractAddress")(i),a=U(this.constructor,"getContract")(o,this.interface,this.signer);return zt(a,i),F(a,"deployTransaction",i),a}))}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){null==e&&Lt.throwError("missing compiler output",d.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}static getInterface(e){return Qt.getInterface(e)}static getContractAddress(e){return he(e)}static getContract(e,t,r){return new Qt(e,t,r)}}},5039: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&&void 0!==window.Buffer?window.Buffer:r(92317).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=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 u(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),u=t;u=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=u(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,u=0,c=r;c1&&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")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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?d[6-u.length]+u+r:u+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],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?m+r:d[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,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u: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,_=b>>>13,E=0|a[4],k=8191&E,C=E>>>13,M=0|a[5],x=8191&M,A=M>>>13,S=0|a[6],O=8191&S,P=S>>>13,N=0|a[7],T=8191&N,I=N>>>13,R=0|a[8],B=8191&R,L=R>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,q=U>>>13,V=0|s[1],H=8191&V,G=V>>>13,Z=0|s[2],W=8191&Z,K=Z>>>13,$=0|s[3],Q=8191&$,Y=$>>>13,J=0|s[4],X=8191&J,ee=J>>>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],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>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(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var ve=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var ye=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|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 Ee=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,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 ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,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,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ce=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(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)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,K))+Math.imul(F,W)|0,o=Math.imul(F,K),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(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)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Se=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Oe=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=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(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=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,ue)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ne=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ie=(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)+(Ie>>>26)|0,Ie&=67108863;var Re=(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)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=_e,u[6]=Ee,u[7]=ke,u[8]=Ce,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Se,u[13]=Oe,u[14]=Pe,u[15]=Ne,u[16]=Te,u[17]=Ie,u[18]=Re,0!==l&&(u[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!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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)-(u/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,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),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()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,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),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),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 x(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 _(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(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 A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,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},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(E,_),E.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},E.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 E;else if("p224"===e)t=new k;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.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")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.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),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=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],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.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)},A.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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},73049:(e,t,r)=>{"use strict";r.r(t),r.d(t,{keccak256:()=>Y,pack:()=>Q,sha256:()=>J});var n=r(50629),i=r.n(n);let o=!1,a=!1;const s={debug:1,default:2,info:2,warning:3,error:4,off:5};let u=s.default,l=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 f,d;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(f||(f={})),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"}(d||(d={}));const h="0123456789abcdef";class p{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",e),u>s[r]||console.log.apply(console,t)}debug(...e){this._log(p.levels.DEBUG,e)}info(...e){this._log(p.levels.INFO,e)}warn(...e){this._log(p.levels.WARNING,e)}makeError(e,t,r){if(a)return this.makeError("censored error",t,{});t||(t=p.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=h[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const i=e;let o="";switch(t){case d.NUMERIC_FAULT:{o="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":o+="-"+t;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case d.CALL_EXCEPTION:case d.INSUFFICIENT_FUNDS:case d.MISSING_NEW:case d.NONCE_EXPIRED:case d.REPLACEMENT_UNDERPRICED:case d.TRANSACTION_REPLACED:case d.UNPREDICTABLE_GAS_LIMIT:o=t}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=i,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,p.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",p.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,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",p.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",p.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return l||(l=new p("logger/5.7.0")),l}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!e)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!e,o=!!t}static setLogLevel(e){const t=s[e.toLowerCase()];null!=t?u=t:p.globalLogger().warn("invalid log level - "+e)}static from(e){return new p(e)}}p.errors=d,p.levels=f;const m=new p("bytes/5.7.0");function g(e){return!!e.toHexString}function v(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return v(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function y(e){return"number"==typeof e&&e==e&&e%1==0}function b(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!y(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function w(e,t){if(t||(t={}),"number"==typeof e){m.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),v(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),g(e)&&(e=e.toHexString()),k(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":m.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;ew(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),v(n)}function E(e,t){(e=w(e)).length>t&&m.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),v(r)}function k(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const C="0123456789abcdef";function M(e,t){if(t||(t={}),"number"==typeof e){m.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=C[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),g(e))return e.toHexString();if(k(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":m.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(b(e)){let t="0x";for(let r=0;r>4]+C[15&n]}return t}return m.throwArgumentError("invalid hexlify value","value",e)}var x=i().BN;const A=new p("bignumber/5.7.0"),S={},O=9007199254740991;let P=!1;class N{constructor(e,t){e!==S&&A.throwError("cannot call constructor directly; use BigNumber.from",p.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return I(R(this).fromTwos(e))}toTwos(e){return I(R(this).toTwos(e))}abs(){return"-"===this._hex[0]?N.from(this._hex.substring(1)):this}add(e){return I(R(this).add(R(e)))}sub(e){return I(R(this).sub(R(e)))}div(e){return N.from(e).isZero()&&B("division-by-zero","div"),I(R(this).div(R(e)))}mul(e){return I(R(this).mul(R(e)))}mod(e){const t=R(e);return t.isNeg()&&B("division-by-zero","mod"),I(R(this).umod(t))}pow(e){const t=R(e);return t.isNeg()&&B("negative-power","pow"),I(R(this).pow(t))}and(e){const t=R(e);return(this.isNegative()||t.isNeg())&&B("unbound-bitwise-result","and"),I(R(this).and(t))}or(e){const t=R(e);return(this.isNegative()||t.isNeg())&&B("unbound-bitwise-result","or"),I(R(this).or(t))}xor(e){const t=R(e);return(this.isNegative()||t.isNeg())&&B("unbound-bitwise-result","xor"),I(R(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&B("negative-width","mask"),I(R(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&B("negative-width","shl"),I(R(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&B("negative-width","shr"),I(R(this).shrn(e))}eq(e){return R(this).eq(R(e))}lt(e){return R(this).lt(R(e))}lte(e){return R(this).lte(R(e))}gt(e){return R(this).gt(R(e))}gte(e){return R(this).gte(R(e))}isNegative(){return"-"===this._hex[0]}isZero(){return R(this).isZero()}toNumber(){try{return R(this).toNumber()}catch(e){B("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return A.throwError("this platform does not support BigInt",p.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?P||(P=!0,A.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?A.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",p.errors.UNEXPECTED_ARGUMENT,{}):A.throwError("BigNumber.toString does not accept parameters",p.errors.UNEXPECTED_ARGUMENT,{})),R(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof N)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new N(S,T(e)):e.match(/^-?[0-9]+$/)?new N(S,T(new x(e))):A.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&B("underflow","BigNumber.from",e),(e>=O||e<=-O)&&B("overflow","BigNumber.from",e),N.from(String(e));const t=e;if("bigint"==typeof t)return N.from(t.toString());if(b(t))return N.from(M(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return N.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(k(e)||"-"===e[0]&&k(e.substring(1))))return N.from(e)}return A.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function T(e){if("string"!=typeof e)return T(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&A.throwArgumentError("invalid hex","value",e),"0x00"===(e=T(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 I(e){return N.from(T(e))}function R(e){const t=N.from(e).toHexString();return"-"===t[0]?new x("-"+t.substring(3),16):new x(t.substring(2),16)}function B(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),A.throwError(e,p.errors.NUMERIC_FAULT,n)}var L=r(91094),j=r.n(L);var D=r(33715),F=r.n(D);new p("sha2/5.7.0");const U=new p("strings/5.7.0");var z,q;function V(e,t,r,n,i){if(e===q.BAD_PREFIX||e===q.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===q.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(z||(z={})),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"}(q||(q={}));Object.freeze({error:function(e,t,r,n,i){return U.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:V,replace:function(e,t,r,n,i){return e===q.OVERLONG?(n.push(i),0):(n.push(65533),V(e,t,r))}});function H(e,t=z.current){t!=z.current&&(U.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<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(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return w(r)}const G=new RegExp("^bytes([0-9]+)$"),Z=new RegExp("^(u?int)([0-9]*)$"),W=new RegExp("^(.*)\\[([0-9]*)\\]$"),K=new p("solidity/5.7.0");function $(e,t,r){switch(e){case"address":return r?E(t,32):w(t);case"string":return H(t);case"bytes":return w(t);case"bool":return t=t?"0x01":"0x00",r?E(t,32):w(t)}let n=e.match(Z);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!=0||0===i||i>256)&&K.throwArgumentError("invalid number type","type",e),r&&(i=256),E(t=N.from(t).toTwos(i),i/8)}if(n=e.match(G),n){const i=parseInt(n[1]);return(String(i)!==n[1]||0===i||i>32)&&K.throwArgumentError("invalid bytes type","type",e),w(t).byteLength!==i&&K.throwArgumentError(`invalid value for ${e}`,"value",t),r?w((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t}if(n=e.match(W),n&&Array.isArray(t)){const r=n[1];parseInt(n[2]||String(t.length))!=t.length&&K.throwArgumentError(`invalid array length for ${e}`,"value",t);const i=[];return t.forEach((function(e){i.push($(r,e,!0))})),_(i)}return K.throwArgumentError("invalid type","type",e)}function Q(e,t){e.length!=t.length&&K.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push($(e,t[n]))})),M(_(r))}function Y(e,t){return r=Q(e,t),"0x"+j().keccak_256(w(r));var r}function J(e,t){return r=Q(e,t),"0x"+F().sha256().update(w(r)).digest("hex");var r}},50629: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&&void 0!==window.Buffer?window.Buffer:r(82169).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=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 u(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),u=t;u=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=u(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,u=0,c=r;c1&&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")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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?d[6-u.length]+u+r:u+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],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?m+r:d[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,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u: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,_=b>>>13,E=0|a[4],k=8191&E,C=E>>>13,M=0|a[5],x=8191&M,A=M>>>13,S=0|a[6],O=8191&S,P=S>>>13,N=0|a[7],T=8191&N,I=N>>>13,R=0|a[8],B=8191&R,L=R>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,q=U>>>13,V=0|s[1],H=8191&V,G=V>>>13,Z=0|s[2],W=8191&Z,K=Z>>>13,$=0|s[3],Q=8191&$,Y=$>>>13,J=0|s[4],X=8191&J,ee=J>>>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],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>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(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var ve=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var ye=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|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 Ee=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,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 ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,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,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ce=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(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)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,K))+Math.imul(F,W)|0,o=Math.imul(F,K),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(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)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Se=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Oe=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=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(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=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,ue)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ne=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ie=(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)+(Ie>>>26)|0,Ie&=67108863;var Re=(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)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=_e,u[6]=Ee,u[7]=ke,u[8]=Ce,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Se,u[13]=Oe,u[14]=Pe,u[15]=Ne,u[16]=Te,u[17]=Ie,u[18]=Re,0!==l&&(u[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!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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)-(u/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,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),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()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,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),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),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 x(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 _(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(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 A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,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},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(E,_),E.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},E.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 E;else if("p224"===e)t=new k;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.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")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.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),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=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],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.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)},A.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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},46474:(e,t,r)=>{"use strict";r.r(t),r.d(t,{commify:()=>Q,formatEther:()=>X,formatUnits:()=>Y,parseEther:()=>ee,parseUnits:()=>J});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 u=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,c;!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"}(c||(c={}));const f="0123456789abcdef";class d{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(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=f[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){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 c.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 c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.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,d.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"),u&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.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",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new d("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?a=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=c,d.levels=l;const h=new d("bytes/5.7.0");function p(e){return!!e.toHexString}function m(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return m(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function g(e){return"number"==typeof e&&e==e&&e%1==0}function v(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!g(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function y(e,t){if(t||(t={}),"number"==typeof e){h.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),m(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),p(e)&&(e=e.toHexString()),b(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":h.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;e>4]+w[15&n]}return t}return h.throwArgumentError("invalid hexlify value","value",e)}function E(e,t){for("string"!=typeof e?e=_(e):b(e)||h.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&h.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}const k="bignumber/5.7.0";var C=r(82454),M=r.n(C)().BN;const x=new d(k),A={},S=9007199254740991;let O=!1;class P{constructor(e,t){e!==A&&x.throwError("cannot call constructor directly; use BigNumber.from",d.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return T(I(this).fromTwos(e))}toTwos(e){return T(I(this).toTwos(e))}abs(){return"-"===this._hex[0]?P.from(this._hex.substring(1)):this}add(e){return T(I(this).add(I(e)))}sub(e){return T(I(this).sub(I(e)))}div(e){return P.from(e).isZero()&&R("division-by-zero","div"),T(I(this).div(I(e)))}mul(e){return T(I(this).mul(I(e)))}mod(e){const t=I(e);return t.isNeg()&&R("division-by-zero","mod"),T(I(this).umod(t))}pow(e){const t=I(e);return t.isNeg()&&R("negative-power","pow"),T(I(this).pow(t))}and(e){const t=I(e);return(this.isNegative()||t.isNeg())&&R("unbound-bitwise-result","and"),T(I(this).and(t))}or(e){const t=I(e);return(this.isNegative()||t.isNeg())&&R("unbound-bitwise-result","or"),T(I(this).or(t))}xor(e){const t=I(e);return(this.isNegative()||t.isNeg())&&R("unbound-bitwise-result","xor"),T(I(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&R("negative-width","mask"),T(I(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&R("negative-width","shl"),T(I(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&R("negative-width","shr"),T(I(this).shrn(e))}eq(e){return I(this).eq(I(e))}lt(e){return I(this).lt(I(e))}lte(e){return I(this).lte(I(e))}gt(e){return I(this).gt(I(e))}gte(e){return I(this).gte(I(e))}isNegative(){return"-"===this._hex[0]}isZero(){return I(this).isZero()}toNumber(){try{return I(this).toNumber()}catch(e){R("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return x.throwError("this platform does not support BigInt",d.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?O||(O=!0,x.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?x.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",d.errors.UNEXPECTED_ARGUMENT,{}):x.throwError("BigNumber.toString does not accept parameters",d.errors.UNEXPECTED_ARGUMENT,{})),I(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(A,N(e)):e.match(/^-?[0-9]+$/)?new P(A,N(new M(e))):x.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&R("underflow","BigNumber.from",e),(e>=S||e<=-S)&&R("overflow","BigNumber.from",e),P.from(String(e));const t=e;if("bigint"==typeof t)return P.from(t.toString());if(v(t))return P.from(_(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&&(b(e)||"-"===e[0]&&b(e.substring(1))))return P.from(e)}return x.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function N(e){if("string"!=typeof e)return N(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&x.throwArgumentError("invalid hex","value",e),"0x00"===(e=N(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 T(e){return P.from(N(e))}function I(e){const t=P.from(e).toHexString();return"-"===t[0]?new M("-"+t.substring(3),16):new M(t.substring(2),16)}function R(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),x.throwError(e,d.errors.NUMERIC_FAULT,n)}const B=new d(k),L={},j=P.from(0),D=P.from(-1);function F(e,t,r,n){const i={fault:t,operation:r};return void 0!==n&&(i.value=n),B.throwError(e,d.errors.NUMERIC_FAULT,i)}let U="0";for(;U.length<256;)U+=U;function z(e){if("number"!=typeof e)try{e=P.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+U.substring(0,e):B.throwArgumentError("invalid decimal size","decimals",e)}function q(e,t){null==t&&(t=0);const r=z(t),n=(e=P.from(e)).lt(j);n&&(e=e.mul(D));let i=e.mod(r).toString();for(;i.length2&&B.throwArgumentError("too many decimal points","value",e);let o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&F("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.lengthnull==e[t]?n:(typeof e[t]!==r&&B.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&&B.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&B.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new H(L,t,r,n)}}class G{constructor(e,t,r,n){e!==L&&B.throwError("cannot use FixedNumber constructor; use FixedNumber.from",d.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&&B.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=V(this._value,this.format.decimals),r=V(e._value,e.format.decimals);return G.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=V(this._value,this.format.decimals),r=V(e._value,e.format.decimals);return G.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=V(this._value,this.format.decimals),r=V(e._value,e.format.decimals);return G.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=V(this._value,this.format.decimals),r=V(e._value,e.format.decimals);return G.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=G.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(Z.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=G.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(Z.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)&&B.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=G.from("1"+U.substring(0,e),this.format),n=W.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&&B.throwArgumentError("invalid byte width","width",e);return E(P.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString(),e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return G.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||function(e){return null!=e&&(P.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||b(e)||"bigint"==typeof e||v(e))}(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),G.fromString(q(e,t),H.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=H.from(t),n=V(e,r.decimals);!r.signed&&n.lt(j)&&F("unsigned value cannot be negative","overflow","value",e);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=E(i,r.width/8));const o=q(n,r.decimals);return new G(L,i,o,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=H.from(t);if(y(e).length>r.width/8)throw new Error("overflow");let n=P.from(e);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=q(n,r.decimals);return new G(L,i,o,r)}static from(e,t){if("string"==typeof e)return G.fromString(e,t);if(v(e))return G.fromBytes(e,t);try{return G.fromValue(e,0,t)}catch(e){if(e.code!==d.errors.INVALID_ARGUMENT)throw e}return B.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const Z=G.from(1),W=G.from("0.5"),K=new d("units/5.7.0"),$=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Q(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&K.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 i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const e=r.length-3;o.unshift(r.substring(e)),r=r.substring(0,e)}}return n+o.join(",")+i}function Y(e,t){if("string"==typeof t){const e=$.indexOf(t);-1!==e&&(t=3*e)}return q(e,null!=t?t:18)}function J(e,t){if("string"!=typeof e&&K.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=$.indexOf(t);-1!==e&&(t=3*e)}return V(e,null!=t?t:18)}function X(e){return Y(e,18)}function ee(e){return J(e,18)}},82454: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&&void 0!==window.Buffer?window.Buffer:r(11160).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=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 u(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),u=t;u=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=u(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,u=0,c=r;c1&&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")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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?d[6-u.length]+u+r:u+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],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?m+r:d[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,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u: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,_=b>>>13,E=0|a[4],k=8191&E,C=E>>>13,M=0|a[5],x=8191&M,A=M>>>13,S=0|a[6],O=8191&S,P=S>>>13,N=0|a[7],T=8191&N,I=N>>>13,R=0|a[8],B=8191&R,L=R>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,q=U>>>13,V=0|s[1],H=8191&V,G=V>>>13,Z=0|s[2],W=8191&Z,K=Z>>>13,$=0|s[3],Q=8191&$,Y=$>>>13,J=0|s[4],X=8191&J,ee=J>>>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],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>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(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var ve=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var ye=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|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 Ee=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,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 ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,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,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ce=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(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)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,K))+Math.imul(F,W)|0,o=Math.imul(F,K),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(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)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Se=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Oe=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=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(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=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,ue)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ne=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ie=(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)+(Ie>>>26)|0,Ie&=67108863;var Re=(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)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=_e,u[6]=Ee,u[7]=ke,u[8]=Ce,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Se,u[13]=Oe,u[14]=Pe,u[15]=Ne,u[16]=Te,u[17]=Ie,u[18]=Re,0!==l&&(u[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!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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)-(u/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,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),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()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,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),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),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 x(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 _(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(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 A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,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},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(E,_),E.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},E.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 E;else if("p224"===e)t=new k;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.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")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.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),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=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],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.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)},A.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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},85665:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Wallet:()=>Qr,verifyMessage:()=>Yr,verifyTypedData:()=>Jr});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 u=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,c;!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"}(c||(c={}));const f="0123456789abcdef";class d{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(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=f[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){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 c.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 c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.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,d.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"),u&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.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",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new d("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?a=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=c,d.levels=l;const h=new d("bytes/5.7.0");function p(e){return!!e.toHexString}function m(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return m(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function g(e){return E(e)&&!(e.length%2)||y(e)}function v(e){return"number"==typeof e&&e==e&&e%1==0}function y(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!v(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function b(e,t){if(t||(t={}),"number"==typeof e){h.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),m(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),p(e)&&(e=e.toHexString()),E(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":h.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;eb(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),m(n)}function _(e){let t=b(e);if(0===t.length)return t;let r=0;for(;r>4]+k[15&n]}return t}return h.throwArgumentError("invalid hexlify value","value",e)}function M(e){if("string"!=typeof e)e=C(e);else if(!E(e)||e.length%2)return null;return(e.length-2)/2}function x(e,t,r){return"string"!=typeof e?e=C(e):(!E(e)||e.length%2)&&h.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function A(e){let t="0x";return e.forEach((e=>{t+=C(e).substring(2)})),t}function S(e,t){for("string"!=typeof e?e=C(e):E(e)||h.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&h.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function O(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(g(e)){let r=b(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=C(r.slice(0,32)),t.s=C(r.slice(32,64))):65===r.length?(t.r=C(r.slice(0,32)),t.s=C(r.slice(32,64)),t.v=r[64]):h.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:h.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=C(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=function(e,t){(e=b(e)).length>t&&h.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),m(r)}(b(t._vs),32);t._vs=C(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&h.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const i=C(r);null==t.s?t.s=i:t.s!==i&&h.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?h.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&&h.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&E(t.r)?t.r=S(t.r,32):h.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&E(t.s)?t.s=S(t.s,32):h.throwArgumentError("signature missing or invalid s","signature",e);const r=b(t.s);r[0]>=128&&h.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=C(r);t._vs&&(E(t._vs)||h.throwArgumentError("signature invalid _vs","signature",e),t._vs=S(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&h.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function P(e){return C(w([(e=O(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}var N=r(60075),T=r.n(N);var I=T().BN;const R=new d("bignumber/5.7.0"),B={},L=9007199254740991;let j=!1;class D{constructor(e,t){e!==B&&R.throwError("cannot call constructor directly; use BigNumber.from",d.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return U(z(this).fromTwos(e))}toTwos(e){return U(z(this).toTwos(e))}abs(){return"-"===this._hex[0]?D.from(this._hex.substring(1)):this}add(e){return U(z(this).add(z(e)))}sub(e){return U(z(this).sub(z(e)))}div(e){return D.from(e).isZero()&&q("division-by-zero","div"),U(z(this).div(z(e)))}mul(e){return U(z(this).mul(z(e)))}mod(e){const t=z(e);return t.isNeg()&&q("division-by-zero","mod"),U(z(this).umod(t))}pow(e){const t=z(e);return t.isNeg()&&q("negative-power","pow"),U(z(this).pow(t))}and(e){const t=z(e);return(this.isNegative()||t.isNeg())&&q("unbound-bitwise-result","and"),U(z(this).and(t))}or(e){const t=z(e);return(this.isNegative()||t.isNeg())&&q("unbound-bitwise-result","or"),U(z(this).or(t))}xor(e){const t=z(e);return(this.isNegative()||t.isNeg())&&q("unbound-bitwise-result","xor"),U(z(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&q("negative-width","mask"),U(z(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&q("negative-width","shl"),U(z(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&q("negative-width","shr"),U(z(this).shrn(e))}eq(e){return z(this).eq(z(e))}lt(e){return z(this).lt(z(e))}lte(e){return z(this).lte(z(e))}gt(e){return z(this).gt(z(e))}gte(e){return z(this).gte(z(e))}isNegative(){return"-"===this._hex[0]}isZero(){return z(this).isZero()}toNumber(){try{return z(this).toNumber()}catch(e){q("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return R.throwError("this platform does not support BigInt",d.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?j||(j=!0,R.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?R.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",d.errors.UNEXPECTED_ARGUMENT,{}):R.throwError("BigNumber.toString does not accept parameters",d.errors.UNEXPECTED_ARGUMENT,{})),z(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof D)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new D(B,F(e)):e.match(/^-?[0-9]+$/)?new D(B,F(new I(e))):R.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&q("underflow","BigNumber.from",e),(e>=L||e<=-L)&&q("overflow","BigNumber.from",e),D.from(String(e));const t=e;if("bigint"==typeof t)return D.from(t.toString());if(y(t))return D.from(C(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return D.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(E(e)||"-"===e[0]&&E(e.substring(1))))return D.from(e)}return R.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function F(e){if("string"!=typeof e)return F(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&R.throwArgumentError("invalid hex","value",e),"0x00"===(e=F(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 U(e){return D.from(F(e))}function z(e){const t=D.from(e).toHexString();return"-"===t[0]?new I("-"+t.substring(3),16):new I(t.substring(2),16)}function q(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),R.throwError(e,d.errors.NUMERIC_FAULT,n)}var V=r(91094),H=r.n(V);function G(e){return"0x"+H().keccak_256(b(e))}const Z=new d("address/5.7.0");function W(e){E(e,20)||Z.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=b(G(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const K={};for(let e=0;e<10;e++)K[String(e)]=String(e);for(let e=0;e<26;e++)K[String.fromCharCode(65+e)]=String(10+e);const $=Math.floor((Q=9007199254740991,Math.log10?Math.log10(Q):Math.log(Q)/Math.LN10));var Q;function Y(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>K[e])).join("");for(;t.length>=$;){let e=t.substring(0,$);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 J(e){let t=null;if("string"!=typeof e&&Z.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=W(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&Z.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)!==Y(e)&&Z.throwArgumentError("bad icap checksum","address",e),r=e.substring(4),t=new I(r,36).toString(16);t.length<40;)t="0"+t;t=W("0x"+t)}else Z.throwArgumentError("invalid address","address",e);var r;return t}var X=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ee=new d("properties/5.7.0");function te(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function re(e){return X(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 ne(e){const t={};for(const r in e)t[r]=e[r];return t}const ie={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oe(e){if(null==e||ie[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;rse(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&te(t,r,se(n))}return t}return ee.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function se(e){return ae(e)}class ue{constructor(e){for(const t in e)this[t]=se(e[t])}}var le=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const ce=new d("abstract-provider/5.7.0");class fe{constructor(){ce.checkAbstract(new.target,fe),te(this,"_isProvider",!0)}getFeeData(){return le(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield re({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,n=null,i=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,i=D.from("1500000000"),n=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:i,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)}}var de=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const he=new d("abstract-signer/5.7.0"),pe=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],me=[d.errors.INSUFFICIENT_FUNDS,d.errors.NONCE_EXPIRED,d.errors.REPLACEMENT_UNDERPRICED];class ge{constructor(){he.checkAbstract(new.target,ge),te(this,"_isSigner",!0)}getBalance(e){return de(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return de(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return de(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield re(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return de(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield re(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return de(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 de(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return de(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return de(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return de(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===pe.indexOf(t)&&he.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=ne(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()&&he.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return de(this,void 0,void 0,(function*(){const t=yield re(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>de(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&he.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||he.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):he.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&&he.throwError("network does not support EIP-1559",d.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):he.throwError("failed to get consistent fee data",d.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(me.indexOf(e.code)>=0)throw e;return he.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",d.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]&&he.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield re(t)}))}_checkProvider(e){this.provider||he.throwError("missing provider",d.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}const ve=new d("strings/5.7.0");var ye,be;function we(e,t,r,n,i){if(e===be.BAD_PREFIX||e===be.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===be.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(ye||(ye={})),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"}(be||(be={}));Object.freeze({error:function(e,t,r,n,i){return ve.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:we,replace:function(e,t,r,n,i){return e===be.OVERLONG?(n.push(i),0):(n.push(65533),we(e,t,r))}});function _e(e,t=ye.current){t!=ye.current&&(ve.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<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(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return b(r)}function Ee(e){return"string"==typeof e&&(e=_e(e)),G(w([_e("Ethereum Signed Message:\n"),_e(String(e.length)),e]))}function ke(e){return G(_e(e))}var Ce=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const Me=new d("hash/5.7.0"),xe=new Uint8Array(32);xe.fill(0);const Ae=D.from(-1),Se=D.from(0),Oe=D.from(1),Pe=D.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const Ne=S(Oe.toHexString(),32),Te=S(Se.toHexString(),32),Ie={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Re=["name","version","chainId","verifyingContract","salt"];function Be(e){return function(t){return"string"!=typeof t&&Me.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const Le={name:Be("name"),version:Be("version"),chainId:function(e){try{return D.from(e).toString()}catch(e){}return Me.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return J(e).toLowerCase()}catch(e){}return Me.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=b(e);if(32!==t.length)throw new Error("bad length");return C(t)}catch(e){}return Me.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function je(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))&&Me.throwArgumentError("invalid numeric width","type",e);const i=Pe.mask(r?n-1:n),o=r?i.add(Oe).mul(Ae):Se;return function(t){const r=D.from(t);return(r.lt(o)||r.gt(i))&&Me.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),S(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))&&Me.throwArgumentError("invalid bytes width","type",e),function(t){return b(t).length!==r&&Me.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=b(e),r=t.length%32;return r?A([t,xe.slice(r)]):C(t)}(t)}}}switch(e){case"address":return function(e){return S(J(e),32)};case"bool":return function(e){return e?Ne:Te};case"bytes":return function(e){return G(e)};case"string":return function(e){return ke(e)}}return null}function De(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class Fe{constructor(e){te(this,"types",Object.freeze(se(e))),te(this,"_encoderCache",{}),te(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const i={};e[n].forEach((o=>{i[o.name]&&Me.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",e),i[o.name]=!0;const a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===n&&Me.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e);je(a)||(r[a]||Me.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",e),r[a].push(n),t[n][a]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?Me.throwArgumentError("missing primary type","types",e):i.length>1&&Me.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),te(this,"primaryType",i[0]),function i(o,a){a[o]&&Me.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 t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=De(t,e[t])+r.map((t=>De(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=je(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&&Me.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(G)),G(A(i))}}const r=this.types[e];if(r){const t=ke(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?G(n):n}));return n.unshift(t),A(n)}}return Me.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||Me.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return G(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(je(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&&Me.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,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{}):Me.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Fe(e)}static getPrimaryType(e){return Fe.from(e).primaryType}static hashStruct(e,t,r){return Fe.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=Ie[r];n||Me.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>Re.indexOf(e.name)-Re.indexOf(t.name))),Fe.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return A(["0x1901",Fe.hashDomain(e),Fe.from(t).hash(r)])}static hash(e,t,r){return G(Fe.encode(e,t,r))}static resolveNames(e,t,r,n){return Ce(this,void 0,void 0,(function*(){e=ne(e);const i={};e.verifyingContract&&!E(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Fe.from(t);o.visit(r,((e,t)=>("address"!==e||E(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=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){Fe.hashDomain(e);const n={},i=[];Re.forEach((t=>{const r=e[t];null!=r&&(n[t]=Le[t](r),i.push({name:t,type:Ie[t]}))}));const o=Fe.from(t),a=ne(t);return a.EIP712Domain?Me.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):a.EIP712Domain=i,o.encode(r),{types:a,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return C(b(t));if(e.match(/^u?int/))return D.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&Me.throwArgumentError("invalid string","value",t),t}return Me.throwArgumentError("unsupported type","type",e)}))}}}class Ue{constructor(e){te(this,"alphabet",e),te(this,"base",e.length),te(this,"_alphabetMap",{}),te(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e=0;--e)n+=this.alphabet[r[e]];return n}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>24&255,u[t.length+1]=f>>16&255,u[t.length+2]=f>>8&255,u[t.length+3]=255&f;let d=b(We(i,e,u));o||(o=d.length,c=new Uint8Array(o),a=Math.ceil(n/o),l=n-(a-1)*o),c.set(d);for(let t=1;t>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}})),Xe=$e((function(e,t){var r=t;r.assert=Qe,r.toArray=Je.toArray,r.zero2=Je.zero2,r.toHex=Je.toHex,r.encode=Je.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)-u:u,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,u=e.andln(3)+i&3,l=t.andln(3)+o&3;3===u&&(u=-1),3===l&&(l=-1),a=0==(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==l?u:-u,r[0].push(a),s=0==(1&l)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?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(T())(e,"hex","le")}})),et=Xe.getNAF,tt=Xe.getJSF,rt=Xe.assert;function nt(e,t){this.type=e,this.p=new(T())(t.p,16),this.red=t.prime?T().red(t.prime):T().mont(this.p),this.zero=new(T())(0).toRed(this.red),this.one=new(T())(1).toRed(this.red),this.two=new(T())(2).toRed(this.red),this.n=t.n&&new(T())(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 it=nt;function ot(e,t){this.curve=e,this.type=t,this.precomputed=null}nt.prototype.point=function(){throw new Error("Not implemented")},nt.prototype.validate=function(){throw new Error("Not implemented")},nt.prototype._fixedNafMul=function(e,t){rt(e.precomputed);var r=e._getDoubles(),n=et(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var l=o[s];rt(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},nt.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,l=this._wnafT2,c=this._wnafT3,f=0;for(o=0;o=1;o-=2){var h=o-1,p=o;if(1===u[h]&&1===u[p]){var m=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(m[1]=t[h].add(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].add(t[p].neg())):(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=tt(r[h],r[p]);for(f=Math.max(v[0].length,f),c[h]=new Array(f),c[p]=new Array(f),a=0;a=0;o--){for(var E=0;o>=0;){var k=!0;for(a=0;a=0&&E++,w=w.dblp(E),o<0)break;for(a=0;a0?s=l[a][C-1>>1]:C<0&&(s=l[a][-C-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},ot.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&&(o=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},ut.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),u=i.mul(r.b),l=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(l).neg()}},ut.prototype.pointFromX=function(e,t){(e=new(T())(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 i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},ut.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)},ut.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},ct.prototype.isInfinity=function(){return this.inf},ct.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)},ct.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)},ct.prototype.getX=function(){return this.x.fromRed()},ct.prototype.getY=function(){return this.y.fromRed()},ct.prototype.mul=function(e){return e=new(T())(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)},ct.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)},ct.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)},ct.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))},ct.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},ct.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},at(ft,it.BasePoint),ut.prototype.jpoint=function(e,t,r){return new ft(this,e,t,r)},ft.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)},ft.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ft.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),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),f=n.redMul(l),d=u.redSqr().redIAdd(c).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},ft.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 u=a.redSqr(),l=u.redMul(a),c=r.redMul(u),f=s.redSqr().redIAdd(l).redISub(c).redISub(c),d=s.redMul(c.redISub(f)).redISub(i.redMul(l)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},ft.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}},ft.prototype.inspect=function(){return this.isInfinity()?"":""},ft.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var dt=$e((function(e,t){var r=t;r.base=it,r.short=lt,r.mont=null,r.edwards=null})),ht=$e((function(e,t){var r,n=t,i=Xe.assert;function o(e){"short"===e.type?this.curve=new dt.short(e):"edwards"===e.type?this.curve=new dt.edwards(e):this.curve=new dt.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 a(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,a("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:He().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:He().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:He().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:He().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"]}),a("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:He().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:He().sha256,gRed:!1,g:["9"]}),a("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:He().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}a("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:He().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function pt(e){if(!(this instanceof pt))return new pt(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=Je.toArray(e.entropy,e.entropyEnc||"hex"),r=Je.toArray(e.nonce,e.nonceEnc||"hex"),n=Je.toArray(e.pers,e.persEnc||"hex");Qe(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var mt=pt;pt.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},pt.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=Je.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var bt=Xe.assert;function wt(e,t){if(e instanceof wt)return e;this._importDER(e,t)||(bt(e.r&&e.s,"Signature without r or s"),this.r=new(T())(e.r,16),this.s=new(T())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var _t=wt;function Et(){this.place=0}function kt(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 Ct(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)}}wt.prototype._importDER=function(e,t){e=Xe.toArray(e,t);var r=new Et;if(48!==e[r.place++])return!1;var n=kt(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=kt(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=kt(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new(T())(o),this.s=new(T())(s),this.recoveryParam=null,!0},wt.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=Ct(t),r=Ct(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Mt(n,t.length),(n=n.concat(t)).push(2),Mt(n,r.length);var i=n.concat(r),o=[48];return Mt(o,i.length),o=o.concat(i),Xe.encode(o,e)};var xt=function(){throw new Error("unsupported")},At=Xe.assert;function St(e){if(!(this instanceof St))return new St(e);"string"==typeof e&&(At(Object.prototype.hasOwnProperty.call(ht,e),"Unknown curve "+e),e=ht[e]),e instanceof ht.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 Ot=St;St.prototype.keyPair=function(e){return new yt(this,e)},St.prototype.keyFromPrivate=function(e,t){return yt.fromPrivate(this,e,t)},St.prototype.keyFromPublic=function(e,t){return yt.fromPublic(this,e,t)},St.prototype.genKeyPair=function(e){e||(e={});for(var t=new mt({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||xt(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(T())(2));;){var i=new(T())(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},St.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},St.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(T())(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),a=e.toArray("be",i),s=new mt({hash:this.hash,entropy:o,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new(T())(1)),l=0;;l++){var c=n.k?n.k(l):new(T())(s.generate(this.n.byteLength()));if(!((c=this._truncateToN(c,!0)).cmpn(1)<=0||c.cmp(u)>=0)){var f=this.g.mul(c);if(!f.isInfinity()){var d=f.getX(),h=d.umod(this.n);if(0!==h.cmpn(0)){var p=c.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var m=(f.getY().isOdd()?1:0)|(0!==d.cmp(h)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),m^=1),new _t({r:h,s:p,recoveryParam:m})}}}}}},St.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(T())(e,16)),r=this.keyFromPublic(r,n);var i=(t=new _t(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),u=s.mul(e).umod(this.n),l=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},St.prototype.recoverPubKey=function(e,t,r,n){At((3&r)===r,"The recovery param is more than two bits"),t=new _t(t,n);var i=this.n,o=new(T())(e),a=t.r,s=t.s,u=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var c=t.r.invm(i),f=i.sub(o).mul(c).umod(i),d=s.mul(c).umod(i);return this.g.mulAdd(f,a,d)},St.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new _t(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 Pt=$e((function(e,t){var r=t;r.version="6.5.4",r.utils=Xe,r.rand=function(){throw new Error("unsupported")},r.curve=dt,r.curves=ht,r.ec=Ot,r.eddsa=null})).ec;const Nt=new d("signing-key/5.7.0");let Tt=null;function It(){return Tt||(Tt=new Pt("secp256k1")),Tt}class Rt{constructor(e){te(this,"curve","secp256k1"),te(this,"privateKey",C(e)),32!==M(this.privateKey)&&Nt.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=It().keyFromPrivate(b(this.privateKey));te(this,"publicKey","0x"+t.getPublic(!1,"hex")),te(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),te(this,"_isSigningKey",!0)}_addPoint(e){const t=It().keyFromPublic(b(this.publicKey)),r=It().keyFromPublic(b(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=It().keyFromPrivate(b(this.privateKey)),r=b(e);32!==r.length&&Nt.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return O({recoveryParam:n.recoveryParam,r:S("0x"+n.r.toString(16),32),s:S("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=It().keyFromPrivate(b(this.privateKey)),r=It().keyFromPublic(b(Bt(e)));return S("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function Bt(e,t){const r=b(e);if(32===r.length){const e=new Rt(r);return t?"0x"+It().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?C(r):"0x"+It().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+It().keyFromPublic(r).getPublic(!0,"hex"):C(r):Nt.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Lt=new d("rlp/5.7.0");function jt(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Dt(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(Dt(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=jt(t.length);return r.unshift(247+r.length),r.concat(t)}g(e)||Lt.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call(b(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=jt(t.length);return r.unshift(183+r.length),r.concat(t)}function Ft(e){return C(Dt(e))}const Ut=new d("transactions/5.7.0");var zt;!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(zt||(zt={}));const qt=[{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"}],Vt={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Ht(e){return J(x(G(x(Bt(e),1)),12))}function Gt(e,t){return Ht(function(e,t){const r=O(t),n={r:b(r.r),s:b(r.s)};return"0x"+It().recoverPubKey(b(e),n,r.recoveryParam).encode("hex",!1)}(b(e),t))}function Zt(e,t){const r=_(D.from(e).toHexString());return r.length>32&&Ut.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function Wt(e,t){return{address:J(e),storageKeys:(t||[]).map(((t,r)=>(32!==M(t)&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function Kt(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),Wt(e[0],e[1])):Wt(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return Wt(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function $t(e){return Kt(e).map((e=>[e.address,e.storageKeys]))}function Qt(e,t){if(null!=e.gasPrice){const t=D.from(e.gasPrice),r=D.from(e.maxFeePerGas||0);t.eq(r)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[Zt(e.chainId||0,"chainId"),Zt(e.nonce||0,"nonce"),Zt(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Zt(e.maxFeePerGas||0,"maxFeePerGas"),Zt(e.gasLimit||0,"gasLimit"),null!=e.to?J(e.to):"0x",Zt(e.value||0,"value"),e.data||"0x",$t(e.accessList||[])];if(t){const e=O(t);r.push(Zt(e.recoveryParam,"recoveryParam")),r.push(_(e.r)),r.push(_(e.s))}return A(["0x02",Ft(r)])}function Yt(e,t){const r=[Zt(e.chainId||0,"chainId"),Zt(e.nonce||0,"nonce"),Zt(e.gasPrice||0,"gasPrice"),Zt(e.gasLimit||0,"gasLimit"),null!=e.to?J(e.to):"0x",Zt(e.value||0,"value"),e.data||"0x",$t(e.accessList||[])];if(t){const e=O(t);r.push(Zt(e.recoveryParam,"recoveryParam")),r.push(_(e.r)),r.push(_(e.s))}return A(["0x01",Ft(r)])}function Jt(e,t){var r,n;n=Vt,(r=e)&&"object"==typeof r||ee.throwArgumentError("invalid object","object",r),Object.keys(r).forEach((e=>{n[e]||ee.throwArgumentError("invalid object key - "+e,"transaction:"+e,r)}));const i=[];qt.forEach((function(t){let r=e[t.name]||[];const n={};t.numeric&&(n.hexPad="left"),r=b(C(r,n)),t.length&&r.length!==t.length&&r.length>0&&Ut.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r),t.maxLength&&(r=_(r),r.length>t.maxLength&&Ut.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r)),i.push(C(r))}));let o=0;if(null!=e.chainId?(o=e.chainId,"number"!=typeof o&&Ut.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!g(t)&&t.v>28&&(o=Math.floor((t.v-35)/2)),0!==o&&(i.push(C(o)),i.push("0x"),i.push("0x")),!t)return Ft(i);const a=O(t);let s=27+a.recoveryParam;return 0!==o?(i.pop(),i.pop(),i.pop(),s+=2*o+8,a.v>28&&a.v!==s&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):a.v!==s&&Ut.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),i.push(C(s)),i.push(_(b(a.r))),i.push(_(b(a.s))),Ft(i)}function Xt(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),Jt(e,t);switch(e.type){case 1:return Yt(e,t);case 2:return Qt(e,t)}return Ut.throwError(`unsupported transaction type: ${e.type}`,d.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}const er=new d("wordlists/5.7.0");class tr{constructor(e){er.checkAbstract(new.target,tr),te(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 ke(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}let rr=null;function nr(e){if(null==rr&&(rr="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==tr.check(e)))throw rr=null,new Error("BIP39 Wordlist for en (English) FAILED")}const ir=new class extends tr{constructor(){super("en")}getWord(e){return nr(this),rr[e]}getWordIndex(e){return nr(this),rr.indexOf(e)}};tr.register(ir);const or={en:ir},ar=new d("hdnode/5.7.0"),sr=D.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ur=_e("Bitcoin seed"),lr=2147483648;function cr(e){return(1<=256)throw new Error("Depth too large!");return dr(w([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",C(this.depth),this.parentFingerprint,S(C(this.index),4),this.chainCode,null!=this.privateKey?w(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new gr(pr,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+="/"+(2147483647&e));const r=new Uint8Array(37);if(e&lr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(b(this.privateKey),1),t&&(t+="'")}else r.set(b(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=b(We(qe.sha512,this.chainCode,r)),i=n.slice(0,32),o=n.slice(32);let a=null,s=null;if(this.privateKey)a=fr(D.from(i).add(this.privateKey).mod(sr));else{s=new Rt(C(i))._addPoint(this.publicKey)}let u=t;const l=this.mnemonic;return l&&(u=Object.freeze({phrase:l.phrase,path:t,locale:l.locale||"en"})),new gr(pr,a,s,this.fingerprint,fr(o),e,this.depth+1,u)}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 e=0;e=lr)throw new Error("invalid path index - "+n);r=r._derive(lr+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=lr)throw new Error("invalid path index - "+n);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=b(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=b(We(qe.sha512,ur,r));return new gr(pr,fr(n.slice(0,32)),null,"0x00000000",fr(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=yr(vr(e,r=hr(r)),r),gr._fromSeed(function(e,t){t||(t="");const r=_e("mnemonic"+t,ye.NFKD);return Ke(_e(e,ye.NFKD),r,2048,64,"sha512")}(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return gr._fromSeed(e,null)}static fromExtendedKey(e){const t=ze.decode(e);82===t.length&&dr(t.slice(0,78))===e||ar.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],n=C(t.slice(5,9)),i=parseInt(C(t.slice(9,13)).substring(2),16),o=C(t.slice(13,45)),a=t.slice(45,78);switch(C(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new gr(pr,null,C(a),n,o,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==a[0])break;return new gr(pr,C(a.slice(1)),null,n,o,i,r,null)}return ar.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function vr(e,t){t=hr(t),ar.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=b(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let e=0;e>3]|=1<<7-i%8),i++}const o=32*r.length/3,a=cr(r.length/3);if((b(Ze(n.slice(0,o/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return C(n.slice(0,o/8))}function yr(e,t){if(t=hr(t),(e=b(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const i=e.length/4,o=b(Ze(e))[0]&cr(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,t.join(r.map((e=>t.getWord(e))))}const br=new d("random/5.7.0");const wr=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();let _r=wr.crypto||wr.msCrypto;function Er(e){(e<=0||e>1024||e%1||e!=e)&&br.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return _r.getRandomValues(t),b(t)}_r&&_r.getRandomValues||(br.warn("WARNING: Missing strong random number source"),_r={getRandomValues:function(e){return br.throwError("no secure random source avaialble",d.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var kr=r(78826),Cr=r.n(kr);const Mr="json-wallets/5.7.0";function xr(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),b(e)}function Ar(e,t){for(e=String(e);e.lengtht)),te(this,"address",Ht(this.publicKey)),this.address!==J(e.address)&&$r.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;te(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||mr,locale:t.locale||"en"})));const r=this.mnemonic;Ht(gr.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path).privateKey)!==this.address&&$r.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else te(this,"_mnemonic",(()=>null))}else{if(Rt.isSigningKey(e))"secp256k1"!==e.curve&&$r.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),te(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new Rt(e);te(this,"_signingKey",(()=>t))}te(this,"_mnemonic",(()=>null)),te(this,"address",Ht(this.publicKey))}var r;t&&!fe.isProvider(t)&&$r.throwArgumentError("invalid provider","provider",t),te(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 Qr(this,e)}signTransaction(e){return re(e).then((t=>{null!=t.from&&(J(t.from)!==this.address&&$r.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest(G(Xt(t)));return Xt(t,r)}))}signMessage(e){return Kr(this,void 0,void 0,(function*(){return P(this._signingKey().signDigest(Ee(e)))}))}_signTypedData(e,t,r){return Kr(this,void 0,void 0,(function*(){const n=yield Fe.resolveNames(e,t,r,(e=>(null==this.provider&&$r.throwError("cannot resolve ENS names without a provider",d.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return P(this._signingKey().signDigest(Fe.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={}),function(e,t,r,n){try{if(J(e.address)!==Ht(e.privateKey))throw new Error("address/privateKey mismatch");if(Ur(e)){const t=e.mnemonic;if(gr.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||mr).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof r||n||(n=r,r={}),r||(r={});const i=b(e.privateKey),o=Sr(t);let a=null,s=null,u=null;if(Ur(e)){const t=e.mnemonic;a=b(vr(t.phrase,t.locale||"en")),s=t.path||mr,u=t.locale||"en"}let l=r.client;l||(l="ethers.js");let c=null;c=r.salt?b(r.salt):Er(32);let f=null;if(r.iv){if(f=b(r.iv),16!==f.length)throw new Error("invalid iv")}else f=Er(16);let d=null;if(r.uuid){if(d=b(r.uuid),16!==d.length)throw new Error("invalid uuid")}else d=Er(16);let h=1<<17,p=8,m=1;return r.scrypt&&(r.scrypt.N&&(h=r.scrypt.N),r.scrypt.r&&(p=r.scrypt.r),r.scrypt.p&&(m=r.scrypt.p)),jr().scrypt(o,c,h,p,m,64,n).then((t=>{const r=(t=b(t)).slice(0,16),n=t.slice(16,32),o=t.slice(32,64),g=new(Cr().Counter)(f),v=b(new(Cr().ModeOfOperation.ctr)(r,g).encrypt(i)),y=G(w([n,v])),_={address:e.address.substring(2).toLowerCase(),id:Pr(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:C(f).substring(2)},ciphertext:C(v).substring(2),kdf:"scrypt",kdfparams:{salt:C(c).substring(2),n:h,dklen:32,p:m,r:p},mac:y.substring(2)}};if(a){const e=Er(16),t=new(Cr().Counter)(e),r=b(new(Cr().ModeOfOperation.ctr)(o,t).encrypt(a)),n=new Date,i=n.getUTCFullYear()+"-"+Ar(n.getUTCMonth()+1,2)+"-"+Ar(n.getUTCDate(),2)+"T"+Ar(n.getUTCHours(),2)+"-"+Ar(n.getUTCMinutes(),2)+"-"+Ar(n.getUTCSeconds(),2)+".0Z";_["x-ethers"]={client:l,gethFilename:"UTC--"+i+"--"+_.address,mnemonicCounter:C(e).substring(2),mnemonicCiphertext:C(r).substring(2),path:s,locale:u,version:"0.1"}}return JSON.stringify(_)}))}(this,e,t,r)}static createRandom(e){let t=Er(16);e||(e={}),e.extraEntropy&&(t=b(x(G(w([t,e.extraEntropy])),0,16)));const r=yr(t,e.locale);return Qr.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return Zr(e,t,r).then((e=>new Qr(e)))}static fromEncryptedJsonSync(e,t){return new Qr(Wr(e,t))}static fromMnemonic(e,t,r){return t||(t=mr),new Qr(gr.fromMnemonic(e,null,r).derivePath(t))}}function Yr(e,t){return Gt(Ee(e),t)}function Jr(e,t,r,n){return Gt(Fe.hash(e,t,r),n)}},60075: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&&void 0!==window.Buffer?window.Buffer:r(49868).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=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 u(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),u=t;u=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=u(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,u=0,c=r;c1&&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")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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?d[6-u.length]+u+r:u+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],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?m+r:d[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,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u: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,_=b>>>13,E=0|a[4],k=8191&E,C=E>>>13,M=0|a[5],x=8191&M,A=M>>>13,S=0|a[6],O=8191&S,P=S>>>13,N=0|a[7],T=8191&N,I=N>>>13,R=0|a[8],B=8191&R,L=R>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,q=U>>>13,V=0|s[1],H=8191&V,G=V>>>13,Z=0|s[2],W=8191&Z,K=Z>>>13,$=0|s[3],Q=8191&$,Y=$>>>13,J=0|s[4],X=8191&J,ee=J>>>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],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>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(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var ve=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var ye=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|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 Ee=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,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 ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,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,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ce=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(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)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,K))+Math.imul(F,W)|0,o=Math.imul(F,K),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(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)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Se=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Oe=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=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(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=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,ue)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ne=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ie=(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)+(Ie>>>26)|0,Ie&=67108863;var Re=(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)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=_e,u[6]=Ee,u[7]=ke,u[8]=Ce,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Se,u[13]=Oe,u[14]=Pe,u[15]=Ne,u[16]=Te,u[17]=Ie,u[18]=Re,0!==l&&(u[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!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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)-(u/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,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),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()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,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),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),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 x(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 _(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(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 A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,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},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(E,_),E.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},E.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 E;else if("p224"===e)t=new k;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.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")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.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),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=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],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.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)},A.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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},20378:(e,t,r)=>{const n=r(38798),i=r(48872),o=r(54422),a=r(30037);function s(e,t,r,o,a){const s=[].slice.call(arguments,1),u=s.length,l="function"==typeof s[u-1];if(!l&&!n())throw new Error("Callback required as last argument");if(!l){if(u<1)throw new Error("Too few arguments provided");return 1===u?(r=t,t=o=void 0):2!==u||t.getContext||(o=r,r=t,t=void 0),new Promise((function(n,a){try{const a=i.create(r,o);n(e(a,t,o))}catch(e){a(e)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(a=r,r=t,t=o=void 0):3===u&&(t.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=r,r=t,t=void 0));try{const n=i.create(r,o);a(null,e(n,t,o))}catch(e){a(e)}}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)}))},38798:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},723:(e,t,r)=>{const n=r(99434).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7];for(let e=1;e{const n=r(36915),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){let t;for(t=0;t+2<=this.data.length;t+=2){let 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},97544:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},98364:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},86303:(e,t,r)=>{const n=r(62378),i=r(36915);function o(e){this.mode=i.BYTE,this.data=new Uint8Array(n(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(let t=0,r=this.data.length;t{const n=r(81034),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}}},81034:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==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(e){return r}}},82315:(e,t,r)=>{const n=r(99434).getSymbolSize;t.getPositions=function(e){const t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},68761:(e,t,r)=>{const n=r(99434),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){const r=e.bit<<3|t;let o=r<<10;for(;n.getBCHDigit(o)-i>=0;)o^=1335<{const r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},73122:(e,t,r)=>{const n=r(36915),i=r(99434);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){let 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},78621:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const 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){const t=e.size;let n=0,i=0,o=0,a=null,s=null;for(let u=0;u=5&&(n+=r+(i-5)),a=t,i=1),t=e.get(l,u),t===s?o++:(o>=5&&(n+=r+(o-5)),s=t,o=1)}i>=5&&(n+=r+(i-5)),o>=5&&(n+=r+(o-5))}return n},t.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n=10&&(1488===n||93===n)&&r++,o=o<<1&2047|e.get(a,i),a>=10&&(1488===o||93===o)&&r++}return r*i},t.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let n=0;n{const n=r(27695),i=r(31219);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(e){return r}}},45324:(e,t,r)=>{const n=r(36915);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){let 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);const 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},11119:(e,t,r)=>{const n=r(50999);t.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i=0;){const e=r[0];for(let i=0;i{const n=r(99434),i=r(81034),o=r(97544),a=r(98364),s=r(723),u=r(82315),l=r(78621),c=r(65781),f=r(24978),d=r(43252),h=r(68761),p=r(36915),m=r(83431);function g(e,t,r){const n=e.size,i=h.getEncodedBits(t,r);let o,a;for(o=0;o<15;o++)a=1==(i>>o&1),o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(n-15+o,8,a,!0),o<8?e.set(8,n-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(n-8,8,1,!0)}function v(e,t,r){const i=new o;r.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(i)}));const a=8*(n.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const s=(a-i.getLengthInBits())/8;for(let e=0;e=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,o+n,!0,!0):e.set(i+t,o+n,!1,!0))}}(p,t),function(e){const t=e.size;for(let r=8;r=7&&function(e,t){const r=e.size,n=d.getEncodedBits(t);let i,o,a;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+r-8-3,a=1==(n>>t&1),e.set(i,o,a,!0),e.set(o,i,a,!0)}(p,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,s-r)){let n=!1;a>>o&1)),e.set(i,s-r,n),o--,-1===o&&(a++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(p,f),isNaN(i)&&(i=l.getBestMask(p,g.bind(null,p,r))),l.applyMask(i,p),g(p,r,i),{modules:p,version:t,errorCorrectionLevel:r,maskPattern:i,segments:o}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,o,a=i.M;return void 0!==t&&(a=i.from(t.errorCorrectionLevel,i.M),r=d.from(t.version),o=l.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),y(e,r,a,o)}},24978:(e,t,r)=>{const n=r(11119);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},31219:(e,t)=>{const r="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\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");const o=new RegExp("^"+n+"$"),a=new RegExp("^[0-9]+$"),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)}},83431:(e,t,r)=>{const n=r(36915),i=r(45324),o=r(31991),a=r(86303),s=r(73122),u=r(31219),l=r(99434),c=r(65987);function f(e){return unescape(encodeURIComponent(e)).length}function d(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function h(e){const t=d(u.NUMERIC,n.NUMERIC,e),r=d(u.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,o;l.isKanjiModeEnabled()?(i=d(u.BYTE,n.BYTE,e),o=d(u.KANJI,n.KANJI,e)):(i=d(u.BYTE_KANJI,n.BYTE,e),o=[]);return t.concat(r,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case 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){let r;const u=n.getBestModeForData(e);if(r=n.from(t,u),r!==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()))}},99434:(e,t)=>{let r;const 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){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},27695:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},43252:(e,t,r)=>{const n=r(99434),i=r(65781),o=r(81034),a=r(36915),s=r(27695),u=n.getBCHDigit(7973);function l(e,t){return a.getCharCountIndicator(e,t)+4}function c(e,t){let r=0;return e.forEach((function(e){const n=l(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");void 0===r&&(r=a.BYTE);const o=8*(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(r===a.MIXED)return o;const u=o-l(r,e);switch(r){case a.NUMERIC:return Math.floor(u/10*3);case a.ALPHANUMERIC:return Math.floor(u/11*2);case a.KANJI:return Math.floor(u/13);case a.BYTE:default:return Math.floor(u/8)}},t.getBestVersionForData=function(e,r){let n;const i=o.from(r,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let n=1;n<=40;n++)if(c(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(let 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");let t=e<<12;for(;n.getBCHDigit(t)-u>=0;)t^=7973<{const n=r(26727);t.render=function(e,t,r){let i=r,o=t;void 0!==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);const a=n.getImageWidth(e.modules.size,i),s=o.getContext("2d"),u=s.createImageData(a,a);return n.qrToImageData(u.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(u,0,0),o},t.renderToDataURL=function(e,r,n){let i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});const o=t.render(e,r,i),a=i.type||"image/png",s=i.rendererOpts||{};return o.toDataURL(a,s.quality)}},30037:(e,t,r)=>{const n=r(26727);function i(e,t){const 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){let n=e+t;return void 0!==r&&(n+=" "+r),n}t.render=function(e,t,r){const a=n.getOptions(t),s=e.modules.size,u=e.modules.data,l=s+2*a.margin,c=a.color.light.a?"':"",f="0&&l>0&&e[u-1]||(n+=a?o("M",l+r,.5+c+r):o("m",i,0),i=0,a=!1),l+1',d='viewBox="0 0 '+l+" "+l+'"',h=''+c+f+"\n";return"function"==typeof r&&r(null,h),h}},26727:(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");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const 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={});const t=void 0===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){const n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){const i=r.modules.size,o=r.modules.data,a=t.getScale(i,n),s=Math.floor((i+2*n.margin)*a),u=n.margin*a,l=[n.color.light,n.color.dark];for(let t=0;t=u&&r>=u&&t{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rG});var a=r(67294),s=r(73935);function u(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var l={},c=[];function f(e,t){}function d(e,t){}function h(e,t,r){t||l[r]||(e(!1,r),l[r]=!0)}function p(e,t){h(f,e,t)}p.preMessage=function(e){c.push(e)},p.resetWarned=function(){l={}},p.noteOnce=function(e,t){h(d,e,t)};function m(e){return m="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},m(e)}var g=r(59864);function v(e,t,r){var n=a.useRef({});return"value"in n.current&&!r(n.current.condition,t)||(n.current.value=e(),n.current.condition=t),n.current.value}function y(e,t){"function"==typeof e?e(t):"object"===m(e)&&e&&"current"in e&&(e.current=t)}function b(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):S}function N(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function T(e){return"queue"===e?"prependQueue":e?"prepend":"append"}function I(e){return Array.from((O.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!u())return null;var r=t.csp,n=t.prepend,i=document.createElement("style");i.setAttribute(A,T(n)),null!=r&&r.nonce&&(i.nonce=null==r?void 0:r.nonce),i.innerHTML=e;var o=N(t),a=o.firstChild;if(n){if("queue"===n){var s=I(o).filter((function(e){return["prepend","prependQueue"].includes(e.getAttribute(A))}));if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=N(t);return I(r).find((function(r){return r.getAttribute(P(t))===e}))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=B(e,t);if(r){var n=N(t);n.removeChild(r)}}function j(e,t){var r=O.get(e);if(!r||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}(document,r)){var n=R("",t),i=n.parentNode;O.set(e,i),e.removeChild(n)}}function D(e){if("undefined"==typeof document)return 0;if(e||void 0===x){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var r=document.createElement("div"),n=r.style;n.position="absolute",n.top="0",n.left="0",n.pointerEvents="none",n.visibility="hidden",n.width="200px",n.height="150px",n.overflow="hidden",r.appendChild(t),document.body.appendChild(r);var i=t.offsetWidth;r.style.overflow="scroll";var o=t.offsetWidth;i===o&&(o=r.clientWidth),document.body.removeChild(r),x=i-o}return x}var F="rc-util-locker-".concat(Date.now()),U=0;function z(e){var t=!!e,r=o(a.useState((function(){return U+=1,"".concat(F,"_").concat(U)})),1)[0];C((function(){if(t){var e=D(),n=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};j(N(r),r);var n=B(t,r);if(n){var i,o,a;return null!==(i=r.csp)&&void 0!==i&&i.nonce&&n.nonce!==(null===(o=r.csp)||void 0===o?void 0:o.nonce)&&(n.nonce=null===(a=r.csp)||void 0===a?void 0:a.nonce),n.innerHTML!==e&&(n.innerHTML=e),n}var s=R(e,r);s.setAttribute(P(r),t)}("\nhtml body {\n overflow-y: hidden;\n ".concat(n?"width: calc(100% - ".concat(e,"px);"):"","\n}"),r)}else L(r);return function(){L(r)}}),[t,r])}var q=!1;var V=function(e){return!1!==e&&(u()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},H=a.forwardRef((function(e,t){var r=e.open,n=e.autoLock,i=e.getContainer,l=(e.debug,e.autoDestroy),c=void 0===l||l,f=e.children,d=o(a.useState(r),2),h=d[0],p=d[1],m=h||r;a.useEffect((function(){(c||r)&&p(r)}),[r,c]);var y=o(a.useState((function(){return V(i)})),2),E=y[0],k=y[1];a.useEffect((function(){var e=V(i);k(null!=e?e:null)}));var x=function(e,t){var r=o(a.useState((function(){return u()?document.createElement("div"):null})),1)[0],n=a.useRef(!1),i=a.useContext(w),s=o(a.useState(M),2),l=s[0],c=s[1],f=i||(n.current?void 0:function(e){c((function(t){return[e].concat(_(t))}))});function d(){r.parentElement||document.body.appendChild(r),n.current=!0}function h(){var e;null===(e=r.parentElement)||void 0===e||e.removeChild(r),n.current=!1}return C((function(){return e?i?i(d):d():h(),h}),[e]),C((function(){l.length&&(l.forEach((function(e){return e()})),c(M))}),[l]),[r,f]}(m&&!E),A=o(x,2),S=A[0],O=A[1],P=null!=E?E:S;z(n&&r&&u()&&(P===S||P===document.body));var N,T,I,R,B=null;f&&(N=f,("function"!=typeof(R=(0,g.isMemo)(N)?N.type.type:N.type)||null!==(T=R.prototype)&&void 0!==T&&T.render)&&("function"!=typeof N||null!==(I=N.prototype)&&void 0!==I&&I.render))&&t&&(B=f.ref);var L=function(){for(var e=arguments.length,t=new Array(e),r=0;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:d(e)?2:h(e)?3:0}function u(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){return 2===s(e)?e.get(t):e[t]}function c(e,t,r){var n=s(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return q&&e instanceof Map}function h(e){return V&&e instanceof Set}function p(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Q(e);delete t[W];for(var r=$(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return g(t,!0)}),!0)),e}function v(){n(2)}function y(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=Y[e];return t||n(18,e),t}function w(e,t){Y[e]||(Y[e]=t)}function _(){return U}function E(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function k(e){C(e),e.p.forEach(x),e.p=null}function C(e){e===U&&(U=e.l)}function M(e){return U={p:[],l:U,h:e,m:!0,_:0}}function x(e){var t=e[W];0===t.i||1===t.i?t.j():t.O=!0}function A(e,t){t._=t.p.length;var r=t.p[0],i=void 0!==e&&e!==r;return t.h.g||b("ES5").S(t,e,i),i?(r[W].P&&(k(t),n(4)),o(e)&&(e=S(t,e),t.l||P(t,e)),t.u&&b("Patches").M(r[W].t,e,t.u,t.s)):e=S(t,r,[]),k(t),t.u&&t.v(t.u,t.s),e!==G?e:void 0}function S(e,t,r){if(y(t))return t;var n=t[W];if(!n)return a(t,(function(i,o){return O(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=m(n.k):n.o;a(3===n.i?new Set(i):i,(function(t,o){return O(e,n,i,t,o,r)})),P(e,i,!1),r&&e.u&&b("Patches").R(n,r,e.u,e.s)}return n.o}function O(e,t,r,n,a,s){if(i(a)){var l=S(e,a,s&&t&&3!==t.i&&!u(t.D,n)?s.concat(n):void 0);if(c(r,n,l),!i(l))return;e.m=!1}if(o(a)&&!y(a)){if(!e.h.F&&e._<1)return;S(e,a),t&&t.A.l||P(e,a)}}function P(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&g(t,r)}function N(e,t){var r=e[W];return(r?p(r):e)[t]}function T(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 I(e){e.P||(e.P=!0,e.l&&I(e.l))}function R(e){e.o||(e.o=m(e.t))}function B(e,t,r){var n=d(t)?b("MapSet").N(t,r):h(t)?b("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,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=n,o=J;r&&(i=[n],o=X);var a=Proxy.revocable(i,o),s=a.revoke,u=a.proxy;return n.k=u,n.j=s,u}(t,r):b("ES5").J(t,r);return(r?r.A:_()).p.push(n),n}function L(e){return i(e)||n(22,e),function e(t){if(!o(t))return t;var r,n=t[W],i=s(t);if(n){if(!n.P&&(n.i<4||!b("ES5").K(n)))return n.t;n.I=!0,r=j(t,i),n.I=!1}else r=j(t,i);return a(r,(function(t,i){n&&l(n.t,t)===i||c(r,t,e(i))})),3===i?new Set(r):r}(e)}function j(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function D(){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[W];return J.get(t,e)},set:function(t){var r=this[W];J.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][W];if(!i.P)switch(i.i){case 5:n(i)&&I(i);break;case 4:r(i)&&I(i)}}}function r(e){for(var t=e.t,r=e.k,n=$(r),i=n.length-1;i>=0;i--){var o=n[i];if(o!==W){var a=t[o];if(void 0===a&&!u(t,o))return!0;var s=r[o],l=s&&s[W];if(l?l.t!==a:!f(s,a))return!0}}var c=!!t[W];return n.length!==$(t).length+(c?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;nDe,hg:()=>We,oM:()=>ze});var F,U,z="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),q="undefined"!=typeof Map,V="undefined"!=typeof Set,H="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,G=z?Symbol.for("immer-nothing"):((F={})["immer-nothing"]=!0,F),Z=z?Symbol.for("immer-draftable"):"__$immer_draftable",W=z?Symbol.for("immer-state"):"__$immer_state",K=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),$="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Q=Object.getOwnPropertyDescriptors||function(e){var t={};return $(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Y={},J={get:function(e,t){if(t===W)return e;var r=p(e);if(!u(r,t))return function(e,t,r){var n,i=T(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===N(e.t,t)?(R(e),e.o[t]=B(e.A.h,n,e)):n},has:function(e,t){return t in p(e)},ownKeys:function(e){return Reflect.ownKeys(p(e))},set:function(e,t,r){var n=T(p(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=N(p(e),t),o=null==i?void 0:i[W];if(o&&o.t===r)return e.o[t]=r,e.D[t]=!1,!0;if(f(r,i)&&(void 0!==r||u(e.t,t)))return!0;R(e),I(e)}return e.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in e.o)||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==N(e.t,t)||t in e.t?(e.D[t]=!1,R(e),I(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=p(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)}},X={};a(J,(function(e,t){X[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),X.deleteProperty=function(e,t){return X.set.call(this,e,t,void 0)},X.set=function(e,t,r){return J.set.call(this,e[0],t,r,e[0])};var ee=function(){function e(e){var t=this;this.g=H,this.F=!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=b("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),te=new ee,re=te.produce;te.produceWithPatches.bind(te),te.setAutoFreeze.bind(te),te.setUseProxies.bind(te),te.applyPatches.bind(te),te.createDraft.bind(te),te.finishDraft.bind(te);const ne=re;function ie(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oe(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 ae(e){for(var t=1;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;ti,Zq:()=>x,J0:()=>s,q_:()=>a,Ep:()=>f,WK:()=>T,RQ:()=>S,fp:()=>m,cP:()=>d,pC:()=>A,Zn:()=>C}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(i||(i={}));const o="popstate";function a(e){return void 0===e&&(e={}),h((function(e,t){let{pathname:r="/",search:n="",hash:i=""}=d(e.location.hash.substr(1));return c("",{pathname:r,search:n,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:f(t))}),(function(e,t){u("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function s(e,t){if(!1===e||null==e)throw new Error(t)}function u(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function l(e,t){return{usr:e.state,key:e.key,idx:t}}function c(e,t,r,i){return void 0===r&&(r=null),n({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?d(t):t,{state:r,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function f(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function d(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function h(e,t,r,a){void 0===a&&(a={});let{window:u=document.defaultView,v5Compat:d=!1}=a,h=u.history,p=i.Pop,m=null,g=v();function v(){return(h.state||{idx:null}).idx}function y(){p=i.Pop;let e=v(),t=null==e?null:e-g;g=e,m&&m({action:p,location:w.location,delta:t})}function b(e){let t="null"!==u.location.origin?u.location.origin:u.location.href,r="string"==typeof e?e:f(e);return s(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==g&&(g=0,h.replaceState(n({},h.state,{idx:g}),""));let w={get action(){return p},get location(){return e(u,h)},listen(e){if(m)throw new Error("A history only accepts one active listener");return u.addEventListener(o,y),m=e,()=>{u.removeEventListener(o,y),m=null}},createHref:e=>t(u,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=i.Push;let n=c(w.location,e,t);r&&r(n,e),g=v()+1;let o=l(n,g),a=w.createHref(n);try{h.pushState(o,"",a)}catch(e){u.location.assign(a)}d&&m&&m({action:p,location:w.location,delta:1})},replace:function(e,t){p=i.Replace;let n=c(w.location,e,t);r&&r(n,e),g=v();let o=l(n,g),a=w.createHref(n);h.replaceState(o,"",a),d&&m&&m({action:p,location:w.location,delta:0})},go:e=>h.go(e)};return w}var p;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(p||(p={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function m(e,t,r){void 0===r&&(r="/");let n=C(("string"==typeof t?d(t):t).pathname||"/",r);if(null==n)return null;let i=g(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let o=null;for(let e=0;null==o&&e{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(s(a.relativePath.startsWith(n),'Absolute route path "'+a.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(n.length));let u=S([n,a.relativePath]),l=r.concat(a);e.children&&e.children.length>0&&(s(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),g(e.children,t,l,u)),(null!=e.path||e.index)&&t.push({path:u,score:w(u,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of v(e.path))i(e,t,r);else i(e,t)})),t}function v(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return i?[o,""]:[o];let a=v(n.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const y=/^:\w+$/,b=e=>"*"===e;function w(e,t){let r=e.split("/"),n=r.length;return r.some(b)&&(n+=-2),t&&(n+=2),r.filter((e=>!b(e))).reduce(((e,t)=>e+(y.test(t)?3:""===t?1:10)),n)}function _(e,t){let{routesMeta:r}=e,n={},i="/",o=[];for(let e=0;e(n.push(t),"/([^\\/]+)")));e.endsWith("*")?(n.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");return[new RegExp(i,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce(((e,t,r)=>{if("*"===t){let e=s[r]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return u(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+r+")."),e}}(s[r]||"",t),e}),{}),pathname:o,pathnameBase:a,pattern:e}}function k(e){try{return decodeURI(e)}catch(t){return u(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function C(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function M(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function x(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function A(e,t,r,i){let o;void 0===i&&(i=!1),"string"==typeof e?o=d(e):(o=n({},e),s(!o.pathname||!o.pathname.includes("?"),M("?","pathname","search",o)),s(!o.pathname||!o.pathname.includes("#"),M("#","pathname","hash",o)),s(!o.search||!o.search.includes("#"),M("#","search","hash",o)));let a,u=""===e||""===o.pathname,l=u?"/":o.pathname;if(i||null==l)a=r;else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let c=function(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:i=""}="string"==typeof e?d(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:P(n),hash:N(i)}}(o,a),f=l&&"/"!==l&&l.endsWith("/"),h=(u||"."===l)&&r.endsWith("/");return c.pathname.endsWith("/")||!f&&!h||(c.pathname+="/"),c}const S=e=>e.join("/").replace(/\/\/+/g,"/"),O=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",N=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function T(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const I=["post","put","patch","delete"],R=(new Set(I),["get",...I]);new Set(R),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;Symbol("deferred")},98099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(97117);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 u(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 c(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 f(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 d(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),c(e/4294967296>>>0,t,r),c(e>>>0,t,r+4),t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),f(e>>>0,t,r),f(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=u,t.readUint32LE=l,t.writeUint32BE=c,t.writeInt32BE=c,t.writeUint32LE=f,t.writeInt32LE=f,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=u(e,t);return 4294967296*u(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=d,t.writeInt64BE=d,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(98099),i=r(17309);function o(e,t,r){for(var i=1634760805,o=857760878,a=2036477234,s=1797285236,u=r[3]<<24|r[2]<<16|r[1]<<8|r[0],l=r[7]<<24|r[6]<<16|r[5]<<8|r[4],c=r[11]<<24|r[10]<<16|r[9]<<8|r[8],f=r[15]<<24|r[14]<<16|r[13]<<8|r[12],d=r[19]<<24|r[18]<<16|r[17]<<8|r[16],h=r[23]<<24|r[22]<<16|r[21]<<8|r[20],p=r[27]<<24|r[26]<<16|r[25]<<8|r[24],m=r[31]<<24|r[30]<<16|r[29]<<8|r[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],v=t[7]<<24|t[6]<<16|t[5]<<8|t[4],y=t[11]<<24|t[10]<<16|t[9]<<8|t[8],b=t[15]<<24|t[14]<<16|t[13]<<8|t[12],w=i,_=o,E=a,k=s,C=u,M=l,x=c,A=f,S=d,O=h,P=p,N=m,T=g,I=v,R=y,B=b,L=0;L<20;L+=2)C=(C^=S=S+(T=(T^=w=w+C|0)>>>16|T<<16)|0)>>>20|C<<12,M=(M^=O=O+(I=(I^=_=_+M|0)>>>16|I<<16)|0)>>>20|M<<12,x=(x^=P=P+(R=(R^=E=E+x|0)>>>16|R<<16)|0)>>>20|x<<12,A=(A^=N=N+(B=(B^=k=k+A|0)>>>16|B<<16)|0)>>>20|A<<12,x=(x^=P=P+(R=(R^=E=E+x|0)>>>24|R<<8)|0)>>>25|x<<7,A=(A^=N=N+(B=(B^=k=k+A|0)>>>24|B<<8)|0)>>>25|A<<7,M=(M^=O=O+(I=(I^=_=_+M|0)>>>24|I<<8)|0)>>>25|M<<7,C=(C^=S=S+(T=(T^=w=w+C|0)>>>24|T<<8)|0)>>>25|C<<7,M=(M^=P=P+(B=(B^=w=w+M|0)>>>16|B<<16)|0)>>>20|M<<12,x=(x^=N=N+(T=(T^=_=_+x|0)>>>16|T<<16)|0)>>>20|x<<12,A=(A^=S=S+(I=(I^=E=E+A|0)>>>16|I<<16)|0)>>>20|A<<12,C=(C^=O=O+(R=(R^=k=k+C|0)>>>16|R<<16)|0)>>>20|C<<12,A=(A^=S=S+(I=(I^=E=E+A|0)>>>24|I<<8)|0)>>>25|A<<7,C=(C^=O=O+(R=(R^=k=k+C|0)>>>24|R<<8)|0)>>>25|C<<7,x=(x^=N=N+(T=(T^=_=_+x|0)>>>24|T<<8)|0)>>>25|x<<7,M=(M^=P=P+(B=(B^=w=w+M|0)>>>24|B<<8)|0)>>>25|M<<7;n.writeUint32LE(w+i|0,e,0),n.writeUint32LE(_+o|0,e,4),n.writeUint32LE(E+a|0,e,8),n.writeUint32LE(k+s|0,e,12),n.writeUint32LE(C+u|0,e,16),n.writeUint32LE(M+l|0,e,20),n.writeUint32LE(x+c|0,e,24),n.writeUint32LE(A+f|0,e,28),n.writeUint32LE(S+d|0,e,32),n.writeUint32LE(O+h|0,e,36),n.writeUint32LE(P+p|0,e,40),n.writeUint32LE(N+m|0,e,44),n.writeUint32LE(T+g|0,e,48),n.writeUint32LE(I+v|0,e,52),n.writeUint32LE(R+y|0,e,56),n.writeUint32LE(B+b|0,e,60)}function a(e,t,r,n,a){if(void 0===a&&(a=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=a,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),a(e,t,r,r,n)}},15501:(e,t,r)=>{"use strict";var n=r(25439),i=r(63027),o=r(17309),a=r(98099),s=r(4153);t.Cv=32,t.WH=12,t.pg=16;var u=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 u,l=t.length+this.tagLength;if(i){if(i.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");u=i}else u=new Uint8Array(l);return n.streamXOR(this._key,a,t,u,4),this._authenticate(u.subarray(u.length-this.tagLength,u.length),s,u.subarray(0,u.length-this.tagLength),r),o.wipe(a),u},e.prototype.open=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&s.update(u.subarray(n.length%16))),s.update(r),r.length%16>0&&s.update(u.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 c=s.digest(),f=0;f{"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)}},79984:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState}},512:(e,t,r)=>{"use strict";var n=r(25629),i=r(17309),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(79984),i=r(4153),o=r(17309),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}},63027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4153),i=r(17309);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 u=e[12]|e[13]<<8;this._r[7]=8065&(s>>>11|u<<5);var l=e[14]|e[15]<<8;this._r[8]=8191&(u>>>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],u=this._h[4],l=this._h[5],c=this._h[6],f=this._h[7],d=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],_=this._r[7],E=this._r[8],k=this._r[9];r>=16;){var C=e[t+0]|e[t+1]<<8;i+=8191&C;var M=e[t+2]|e[t+3]<<8;o+=8191&(C>>>13|M<<3);var x=e[t+4]|e[t+5]<<8;a+=8191&(M>>>10|x<<6);var A=e[t+6]|e[t+7]<<8;s+=8191&(x>>>7|A<<9);var S=e[t+8]|e[t+9]<<8;u+=8191&(A>>>4|S<<12),l+=S>>>1&8191;var O=e[t+10]|e[t+11]<<8;c+=8191&(S>>>14|O<<2);var P=e[t+12]|e[t+13]<<8;f+=8191&(O>>>11|P<<5);var N=e[t+14]|e[t+15]<<8,T=0,I=T;I+=i*p,I+=o*(5*k),I+=a*(5*E),I+=s*(5*_),T=(I+=u*(5*w))>>>13,I&=8191,I+=l*(5*b),I+=c*(5*y),I+=f*(5*v),I+=(d+=8191&(P>>>8|N<<8))*(5*g);var R=T+=(I+=(h+=N>>>5|n)*(5*m))>>>13;R+=i*m,R+=o*p,R+=a*(5*k),R+=s*(5*E),T=(R+=u*(5*_))>>>13,R&=8191,R+=l*(5*w),R+=c*(5*b),R+=f*(5*y),R+=d*(5*v),T+=(R+=h*(5*g))>>>13,R&=8191;var B=T;B+=i*g,B+=o*m,B+=a*p,B+=s*(5*k),T=(B+=u*(5*E))>>>13,B&=8191,B+=l*(5*_),B+=c*(5*w),B+=f*(5*b),B+=d*(5*y);var L=T+=(B+=h*(5*v))>>>13;L+=i*v,L+=o*g,L+=a*m,L+=s*p,T=(L+=u*(5*k))>>>13,L&=8191,L+=l*(5*E),L+=c*(5*_),L+=f*(5*w),L+=d*(5*b);var j=T+=(L+=h*(5*y))>>>13;j+=i*y,j+=o*v,j+=a*g,j+=s*m,T=(j+=u*p)>>>13,j&=8191,j+=l*(5*k),j+=c*(5*E),j+=f*(5*_),j+=d*(5*w);var D=T+=(j+=h*(5*b))>>>13;D+=i*b,D+=o*y,D+=a*v,D+=s*g,T=(D+=u*m)>>>13,D&=8191,D+=l*p,D+=c*(5*k),D+=f*(5*E),D+=d*(5*_);var F=T+=(D+=h*(5*w))>>>13;F+=i*w,F+=o*b,F+=a*y,F+=s*v,T=(F+=u*g)>>>13,F&=8191,F+=l*m,F+=c*p,F+=f*(5*k),F+=d*(5*E);var U=T+=(F+=h*(5*_))>>>13;U+=i*_,U+=o*w,U+=a*b,U+=s*y,T=(U+=u*v)>>>13,U&=8191,U+=l*g,U+=c*m,U+=f*p,U+=d*(5*k);var z=T+=(U+=h*(5*E))>>>13;z+=i*E,z+=o*_,z+=a*w,z+=s*b,T=(z+=u*y)>>>13,z&=8191,z+=l*v,z+=c*g,z+=f*m,z+=d*p;var q=T+=(z+=h*(5*k))>>>13;q+=i*k,q+=o*E,q+=a*_,q+=s*w,T=(q+=u*b)>>>13,q&=8191,q+=l*y,q+=c*v,q+=f*g,q+=d*m,i=I=8191&(T=(T=((T+=(q+=h*p)>>>13)<<2)+T|0)+(I&=8191)|0),o=R+=T>>>=13,a=B&=8191,s=L&=8191,u=j&=8191,l=D&=8191,c=F&=8191,f=U&=8191,d=z&=8191,h=q&=8191,t+=16,r-=16}this._h[0]=i,this._h[1]=o,this._h[2]=a,this._h[3]=s,this._h[4]=u,this._h[5]=l,this._h[6]=c,this._h[7]=f,this._h[8]=d,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(46008),i=r(98099),o=r(17309);function a(e,r=t.defaultRandomSource){return r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=a,t.randomUint32=function(e=t.defaultRandomSource){const r=a(4,e),n=(0,i.readUint32LE)(r);return(0,o.wipe)(r),n};const s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(e,r=s,n=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 u=r.length,l=256-256%u;for(;e>0;){const t=a(Math.ceil(256*e/l),n);for(let n=0;n0;n++){const o=t[n];o{"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 e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const n=r(17309);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 e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const n=r(75455),i=r(58871);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)}}},73294:(e,t,r)=>{"use strict";var n=r(98099),i=r(17309);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 u=r+1;u0?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],u=t[1],l=t[2],c=t[3],f=t[4],d=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=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&d^~f&h)|0)+(p+(a[m]+e[m]|0)|0)|0,b=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&u^s&l^u&l)|0;p=h,h=d,d=f,f=c+y|0,c=l,l=u,u=s,s=y+b|0}t[0]+=s,t[1]+=u,t[2]+=l,t[3]+=c,t[4]+=f,t[5]+=d,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}},17309:(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(31416),i=r(17309);function o(e){const t=new Float64Array(16);if(e)for(let r=0;r=0;--e){const t=r[e>>>3]>>>(7&e)&1;l(i,a,t),l(p,m,t),c(g,i,p),f(i,i,p),c(p,a,m),f(a,a,m),h(m,g),h(v,i),d(i,p,i),d(p,a,g),c(g,i,p),f(i,i,p),h(a,i),f(p,m,v),d(i,p,s),c(i,i,m),d(p,p,i),d(i,m,v),d(m,a,n),h(a,g),l(i,a,t),l(p,m,t)}for(let e=0;e<16;e++)n[e+16]=i[e],n[e+32]=p[e],n[e+48]=a[e],n[e+64]=m[e];const y=n.subarray(32),b=n.subarray(16);!function(e,t){const r=o();for(let e=0;e<16;e++)r[e]=t[e];for(let e=253;e>=0;e--)h(r,r),2!==e&&4!==e&&d(r,r,t);for(let t=0;t<16;t++)e[t]=r[t]}(y,y),d(b,b,y);const w=new Uint8Array(32);return function(e,t){const r=o(),n=o();for(let e=0;e<16;e++)n[e]=t[e];u(n),u(n),u(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-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 t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>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,n=!1){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{},36900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(70655);n.__exportStar(r(46869),t),n.__exportStar(r(88033),t)},46869:(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},88033:(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},66736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(70655);n.__exportStar(r(44273),t),n.__exportStar(r(47001),t),n.__exportStar(r(52939),t),n.__exportStar(r(36900),t)},52939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(70655).__exportStar(r(88766),t)},88766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},83207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=r(36900);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},83873:(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)}))}},44273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(70655);n.__exportStar(r(83873),t),n.__exportStar(r(83207),t)},47001:(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(void 0!==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(void 0===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},25550:(e,t,r)=>{"use strict";r.d(t,{AW:()=>y,O6:()=>_t,rV:()=>_,gn:()=>se,H1:()=>te,hF:()=>re,WG:()=>A,pe:()=>O,m$:()=>C,vB:()=>P,HI:()=>S,E0:()=>le,Gq:()=>oe,$0:()=>Y,Z4:()=>ie,Bv:()=>Ee,Au:()=>E,jd:()=>k,gu:()=>m,D:()=>$,Z7:()=>Fe,cO:()=>he,_H:()=>de,fc:()=>Ie,D6:()=>Ue,Hh:()=>fe,Ym:()=>M,rj:()=>x,jU:()=>W,gp:()=>Re,rF:()=>mt,Bw:()=>ue,UG:()=>G,Gg:()=>yt,xW:()=>$e,b$:()=>Z,Ih:()=>Ze,h1:()=>Qe,Q8:()=>I,o8:()=>Ve,qt:()=>ze,Dd:()=>Ye,$t:()=>ut,nf:()=>ft,Q0:()=>at,in:()=>nt,p8:()=>dt,sI:()=>pt,al:()=>ht,L5:()=>qe,EJ:()=>st,Z2:()=>it,PM:()=>ot,hH:()=>lt,ON:()=>vt,n:()=>rt,JT:()=>ct,M_:()=>He,jv:()=>Ke,KC:()=>X,eG:()=>ce,fK:()=>Le,IP:()=>ee,iP:()=>ae,M:()=>Be,he:()=>we,uw:()=>bt,Ll:()=>N,EN:()=>T});var n=r(15501),i=r(512),o=r(31416),a=r(73294),s=r(57664),u=r(37466),l=r(43631),c=r(66736),f=r(62873),d=r(65755),h=r(66151);r(61882);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"}};function m(e,t=[]){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 g(e,t){return e.includes(":")?[e]:t.chains||[]}const v="base10",y="base16",b="base64pad",w="utf8",_=1;function E(){const e=s.Au();return{privateKey:(0,u.BB)(e.secretKey,y),publicKey:(0,u.BB)(e.publicKey,y)}}function k(){const e=(0,o.randomBytes)(32);return(0,u.BB)(e,y)}function C(e,t){const r=s.gi((0,u.mL)(e,y),(0,u.mL)(t,y)),n=new i.t(a.mE,r).expand(32);return(0,u.BB)(n,y)}function M(e){const t=(0,a.vp)((0,u.mL)(e,y));return(0,u.BB)(t,y)}function x(e){const t=(0,a.vp)((0,u.mL)(e,w));return(0,u.BB)(t,y)}function A(e){return Number((0,u.BB)(e,v))}function S(e){const t=function(e){return(0,u.mL)(`${e}`,v)}(typeof e.type<"u"?e.type:0);if(A(t)===_&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?(0,u.mL)(e.senderPublicKey,y):void 0,i=typeof e.iv<"u"?(0,u.mL)(e.iv,y):(0,o.randomBytes)(12);return function(e){if(A(e.type)===_){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,u.BB)((0,u.zo)([e.type,e.senderPublicKey,e.iv,e.sealed]),b)}return(0,u.BB)((0,u.zo)([e.type,e.iv,e.sealed]),b)}({type:t,sealed:new n.OK((0,u.mL)(e.symKey,y)).seal(i,(0,u.mL)(e.message,w)),iv:i,senderPublicKey:r})}function O(e){const t=new n.OK((0,u.mL)(e.symKey,y)),{sealed:r,iv:i}=P(e.encoded),o=t.open(i,r);if(null===o)throw new Error("Failed to decrypt");return(0,u.BB)(o,w)}function P(e){const t=(0,u.mL)(e,b),r=t.slice(0,1);if(A(r)===_){const e=33,n=e+12,i=t.slice(1,e),o=t.slice(e,n);return{type:r,sealed:t.slice(n),iv:o,senderPublicKey:i}}const n=t.slice(1,13);return{type:r,sealed:t.slice(13),iv:n}}function N(e,t){const r=P(e);return T({type:A(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?(0,u.BB)(r.senderPublicKey,y):void 0,receiverPublicKey:t?.receiverPublicKey})}function T(e){const t=e?.type||0;if(t===_){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function I(e){return e.type===_&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var R=Object.defineProperty,B=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,D=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F=(e,t)=>{for(var r in t||(t={}))L.call(t,r)&&D(e,r,t[r]);if(B)for(var r of B(t))j.call(t,r)&&D(e,r,t[r]);return e};const U="react-native",z="node",q="browser",V="unknown",H="js";function G(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Z(){return!(0,f.getDocument)()&&!!(0,f.getNavigator)()&&"ReactNative"===navigator.product}function W(){return!G()&&!!(0,f.getNavigator)()}function K(){return Z()?U:G()?z:W()?q:V}function $(){return(0,d.D)()||{name:"",description:"",url:"",icons:[""]}}function Q(e,t,n){const i=function(){if(K()===U&&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("-")}(),o=function(){var e;const t=K();return t===q?[t,(null==(e=(0,f.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[H,n].join("-"),i,o].join("/")}function Y({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:i,projectId:o,useOnCloseEvent:a}){const s=r.split("?"),u={auth:i,ua:Q(e,t,n),projectId:o,useOnCloseEvent:a||void 0},l=function(e,t){let r=h.parse(e);return r=F(F({},r),t),h.stringify(r)}(s[1]||"",u);return s[0]+"?"+l}function J(e,t){return e.filter((e=>t.includes(e))).length===e.length}function X(e){return Object.fromEntries(e.entries())}function ee(e){return new Map(Object.entries(e))}function te(e=c.FIVE_MINUTES,t){const r=(0,c.toMiliseconds)(e||c.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 re(e,t,r){return new Promise((async(n,i)=>{const o=setTimeout((()=>i(new Error(r))),t);try{n(await e)}catch(e){i(e)}clearTimeout(o)}))}function ne(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 ie(e){return ne("topic",e)}function oe(e){return ne("id",e)}function ae(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 se(e,t){return(0,c.fromMiliseconds)((t||Date.now())+(0,c.toMiliseconds)(e))}function ue(e){return Date.now()>=(0,c.toMiliseconds)(e)}function le(e,t){return`${e}${t?`:${t}`:""}`}function ce(e=[],t=[]){return[...new Set([...e,...t])]}async function fe({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;let i=("string"==typeof n?JSON.parse(n):n)?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));const o=`${i}/wc?requestId=${e}&sessionTopic=${t}`,a=K();a===q?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):a===U&&typeof(null==r.g?void 0:r.g.Linking)<"u"&&await r.g.Linking.openURL(o)}catch(e){console.error(e)}}function de(e){return e?.relay||{protocol:"irn"}}function he(e){const t=p[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var pe=Object.defineProperty,me=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ye=(e,t,r)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function be(e,t="-"){const r={},n="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(n)){const i=t.replace(n,""),o=e[t];r[i]=o}})),r}function we(e){const t=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:_e(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:be(a)}}function _e(e){return e.startsWith("//")?e.substring(2):e}function Ee(e){return`${e.protocol}:${e.topic}@${e.version}?`+h.stringify(((e,t)=>{for(var r in t||(t={}))ge.call(t,r)&&ye(e,r,t[r]);if(me)for(var r of me(t))ve.call(t,r)&&ye(e,r,t[r]);return e})({symKey:e.symKey},function(e,t="-"){const r={};return Object.keys(e).forEach((n=>{const i="relay"+t+n;e[n]&&(r[i]=e[n])})),r}(e.relay)))}var ke=Object.defineProperty,Ce=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,Oe=(e,t,r)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pe=(e,t)=>{for(var r in t||(t={}))Ae.call(t,r)&&Oe(e,r,t[r]);if(xe)for(var r of xe(t))Se.call(t,r)&&Oe(e,r,t[r]);return e},Ne=(e,t)=>Ce(e,Me(t));function Te(e){const t=[];return e.forEach((e=>{const[r,n]=e.split(":");t.push(`${r}:${n}`)})),t}function Ie(e,t){const r=nt(e,t);if(r)throw new Error(r.message);const n={};for(const[t,r]of Object.entries(e))n[t]={methods:r.methods,events:r.events,chains:r.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return n}function Re(e){return e.includes(":")}function Be(e){return Re(e)?e.split(":")[0]:e}function Le(e){var t,r,n;const i={};if(!qe(e))return i;for(const[o,a]of Object.entries(e)){const e=Re(o)?[o]:a.chains,s=a.methods||[],u=a.events||[],l=Be(o);i[l]=Ne(Pe({},i[l]),{chains:ce(e,null==(t=i[l])?void 0:t.chains),methods:ce(s,null==(r=i[l])?void 0:r.methods),events:ce(u,null==(n=i[l])?void 0:n.events)})}return i}const je={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}},De={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 Fe(e,t){const{message:r,code:n}=De[e];return{message:t?`${r} ${t}`:r,code:n}}function Ue(e,t){const{message:r,code:n}=je[e];return{message:t?`${r} ${t}`:r,code:n}}function ze(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function qe(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Ve(e){return typeof e>"u"}function He(e,t){return!(!t||!Ve(e))||"string"==typeof e&&!!e.trim().length}function Ge(e,t){return!(!t||!Ve(e))||"number"==typeof e&&!isNaN(e)}function Ze(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),i=Object.keys(r);let o=!0;return!!J(i,n)&&(n.forEach((t=>{const{accounts:n,methods:i,events:a}=e.namespaces[t],s=Te(n),u=r[t];J(g(t,u),s)&&J(u.methods,i)&&J(u.events,a)||(o=!1)})),o)}function We(e){return!(!He(e,!1)||!e.includes(":"))&&2===e.split(":").length}function Ke(e){if(He(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function $e(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}function Qe(e){return e?.topic}function Ye(e,t){let r=null;return He(e?.publicKey,!1)||(r=Fe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function Je(e){let t=!0;return ze(e)?e.length&&(t=e.every((e=>He(e,!1)))):t=!1,t}function Xe(e,t,r){let n=null;return Object.entries(e).forEach((([e,i])=>{if(n)return;const o=function(e,t,r){let n=null;return ze(t)&&t.length?t.forEach((e=>{n||We(e)||(n=Ue("UNSUPPORTED_CHAINS",`${r}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):We(e)||(n=Ue("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}(e,g(e,i),`${t} ${r}`);o&&(n=o)})),n}function et(e,t){let r=null;return ze(e)?e.forEach((e=>{r||function(e){if(He(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&We(e)}}return!1}(e)||(r=Ue("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):r=Ue("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function tt(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=function(e,t){let r=null;return Je(e?.methods)?Je(e?.events)||(r=Ue("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=Ue("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}(e,`${t}, namespace`);n&&(r=n)})),r}function rt(e,t,r){let n=null;if(e&&qe(e)){const i=tt(e,t);i&&(n=i);const o=Xe(e,t,r);o&&(n=o)}else n=Fe("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function nt(e,t){let r=null;if(e&&qe(e)){const n=tt(e,t);n&&(r=n);const i=function(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=et(e?.accounts,`${t} namespace`);n&&(r=n)})),r}(e,t);i&&(r=i)}else r=Fe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function it(e){return He(e.protocol,!0)}function ot(e,t){let r=!1;return t&&!e?r=!0:e&&ze(e)&&e.length&&e.forEach((e=>{r=it(e)})),r}function at(e){return"number"==typeof e}function st(e){return typeof e<"u"&&null!==typeof e}function ut(e){return!!(e&&"object"==typeof e&&e.code&&Ge(e.code,!1)&&e.message&&He(e.message,!1))}function lt(e){return!(Ve(e)||!He(e.method,!1))}function ct(e){return!(Ve(e)||Ve(e.result)&&Ve(e.error)||!Ge(e.id,!1)||!He(e.jsonrpc,!1))}function ft(e){return!(Ve(e)||!He(e.name,!1))}function dt(e,t){return!(!We(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...Te(e.accounts))})),t}(e).includes(t))}function ht(e,t,r){return!!He(r,!1)&&function(e,t){const r=[];return Object.values(e).forEach((e=>{Te(e.accounts).includes(t)&&r.push(...e.methods)})),r}(e,t).includes(r)}function pt(e,t,r){return!!He(r,!1)&&function(e,t){const r=[];return Object.values(e).forEach((e=>{Te(e.accounts).includes(t)&&r.push(...e.events)})),r}(e,t).includes(r)}function mt(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{Te(e[r].accounts)?.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),u=gt(Object.keys(e)),l=gt(Object.keys(t)),c=u.filter((e=>!l.includes(e)));return c.length&&(n=Fe("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${c.toString()}\n Received: ${Object.keys(t).toString()}`)),J(a,s)||(n=Fe("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=Te(t[e].accounts);i.includes(e)||(n=Fe("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),a.forEach((e=>{n||(J(i[e].methods,o[e].methods)?J(i[e].events,o[e].events)||(n=Fe("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):n=Fe("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))})),n}function gt(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function vt(e,t){return Ge(e,!1)&&e<=t.max&&e>=t.min}function yt(){const e=K();return new Promise((t=>{switch(e){case q:t(W()&&navigator?.onLine);break;case U:t(async function(){if(Z()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo){return(await(null==r.g?void 0:r.g.NetInfo.fetch()))?.isConnected}return!0}());break;default:t(!0)}}))}function bt(e){switch(K()){case q:!function(e){W()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case U:!function(e){Z()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo&&r.g?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const wt={};class _t{static get(e){return wt[e]}static set(e,t){wt[e]=t}static delete(e){delete wt[e]}}},87119: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(e){}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";const n=r(70610),i=r(87119),o=r(80500),a=r(92806),s=Symbol("encodeFragmentIdentifier");function u(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 c(e,t){return t.decode?i(e):e}function f(e){return Array.isArray(e)?e.sort():"object"==typeof e?f(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function d(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=d(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){u((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&&c(r,e).includes(e.arrayFormatSeparator);r=o?c(r,e):r;const a=i||o?r.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===r?r:c(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?c(r,e):r);const o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>c(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:c(a,t),r(c(e,t),a,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,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]=f(r):e[t]=r,e}),Object.create(null))}t.extract=h,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";u((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],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 t of Object.keys(e))r(t)||(i[t]=e[t]);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:c(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[s]:!0},r);const n=d(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query);let u=t.stringify(a,r);u&&(u=`?${u}`);let c=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(c=`#${r[s]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${u}${c}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:i,query:o,fragmentIdentifier:u}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:a(o,r),fragmentIdentifier:u},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)}},62873:(e,t)=>{"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==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")}},65755:(e,t,r)=>{"use strict";t.D=void 0;const n=r(62873);t.D=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function r(...t){const r=e.getElementsByTagName("meta");for(let e=0;en.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=n.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}}},78826: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,u={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("")}},l=(s="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+s[15&n])}return t.join("")}}),c={16:10,24:12,32:14},f=[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],h=[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],p=[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],m=[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],g=[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],v=[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],y=[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],b=[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],w=[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],_=[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],E=[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],k=[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],C=[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],M=[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 x(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,u=i;u>16&255]<<24^d[a>>8&255]<<16^d[255&a]<<8^d[a>>24&255]^f[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=u%4,this._Ke[l][h]=o[t],this._Kd[e-l][h]=o[t++],u++}for(var l=1;l>24&255]^k[a>>16&255]^C[a>>8&255]^M[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=x(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var a=1;a>24&255]^m[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^v[255&n[(i+3)%4]]^this._Ke[a][i];n=r.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(d[n[i]>>24&255]^s>>24),u[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&n[(i+3)%4]]^s);return u},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=x(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var a=1;a>24&255]^b[n[(i+3)%4]>>16&255]^w[n[(i+2)%4]>>8&255]^_[255&n[(i+1)%4]]^this._Kd[a][i];n=r.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(h[n[i]>>24&255]^s>>24),u[4*i+1]=255&(h[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(h[255&n[(i+1)%4]]^s);return u};var S=function(e){if(!(this instanceof S))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new A(e)};S.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},T.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},T.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var I=function(e,t){if(!(this instanceof I))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof T||(t=new T(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new A(e)};I.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{var t={en_GB:"en-gb",en_US:"en",zh_CN:"zh-cn",zh_TW:"zh-tw"};e.exports=function(e,r,n){var i=r.prototype.locale;r.prototype.locale=function(e){var r;return"string"==typeof e&&(e=t[r=e]||r.split("_")[0]),i.call(this,e)}}},69199:(e,t,r)=>{var n=r(27484),i=r(37412),o=r(79212),a=r(28734),s=r(10285),u=r(6833),l=r(172),c=r(55183),f=r(34425),d=r(96036),h=r(56176);n.extend(i),n.extend(o),n.extend(a),n.extend(s),n.extend(u),n.extend(l),n.extend(c),n.extend(f),n.extend(d),n.extend(h);var p=r(40873);n.extend(p)},6459:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(32716)),a=i(r(67900)),s=i(r(68175)),u=n(r(67294)),l=i(r(65400)),c=r(41954);function f(e){return!(!e||!e.then)}var d=function(e){var t=u.useRef(!1),r=u.useRef(null),n=(0,s.default)(!1),i=(0,a.default)(n,2),d=i[0],h=i[1],p=e.close,m=function(){null==p||p.apply(void 0,arguments)};u.useEffect((function(){var t=null;return e.autoFocus&&(t=setTimeout((function(){var e;null===(e=r.current)||void 0===e||e.focus()}))),function(){t&&clearTimeout(t)}}),[]);var g=e.type,v=e.children,y=e.prefixCls,b=e.buttonProps;return u.createElement(l.default,(0,o.default)({},(0,c.convertLegacyProps)(g),{onClick:function(r){var n=e.actionFn;if(!t.current)if(t.current=!0,n){var i;if(e.emitEvent){if(i=n(r),e.quitOnNullishReturnValue&&!f(i))return t.current=!1,void m(r)}else if(n.length)i=n(p),t.current=!1;else if(!(i=n()))return void m();!function(e){f(e)&&(h(!0),e.then((function(){h(!1,!0),m.apply(void 0,arguments),t.current=!1}),(function(e){console.error(e),h(!1,!0),t.current=!1})))}(i)}else m()},loading:d,prefixCls:y},b,{ref:r}),v)};t.default=d},45471:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PresetStatusColorTypes=t.PresetColorTypes=void 0;var n=r(66764),i=(0,n.tuple)("success","processing","error","default","warning");t.PresetStatusColorTypes=i;var o=(0,n.tuple)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime");t.PresetColorTypes=o},70502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRenderPropValue=void 0;t.getRenderPropValue=function(e){return e?"function"==typeof e?e():e:null}},87855:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(67900)),a=n(r(67294)),s=r(38882);t.default=function(){var e=a.useState(!1),t=(0,o.default)(e,2),r=t[0],n=t[1];return a.useEffect((function(){n((0,s.detectFlexGapSupported)())}),[]),r}},23854:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=a.useReducer((function(e){return e+1}),0);return(0,o.default)(e,2)[1]};var o=i(r(67900)),a=n(r(67294))},44104:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=s.useState([]),t=(0,a.default)(e,2),r=t[0],n=t[1],i=s.useCallback((function(e){return n((function(t){return[].concat((0,o.default)(t),[e])})),function(){n((function(t){return t.filter((function(t){return t!==e}))}))}}),[]);return[r,i]};var o=i(r(32354)),a=i(r(67900)),s=n(r(67294))},63406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};t.default=r},53683:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransitionName=t.getTransitionDirection=t.default=void 0;var n=function(){return{height:0,opacity:0}},i=function(e){return{height:e.scrollHeight,opacity:1}},o=function(e,t){return!0===(null==t?void 0:t.deadline)||"height"===t.propertyName},a={motionName:"ant-motion-collapse",onAppearStart:n,onEnterStart:n,onAppearActive:i,onEnterActive:i,onLeaveStart:function(e){return{height:e?e.offsetHeight:0}},onLeaveActive:n,onAppearEnd:o,onEnterEnd:o,onLeaveEnd:o,motionDeadline:500};(0,r(66764).tuple)("bottomLeft","bottomRight","topLeft","topRight");t.getTransitionDirection=function(e){return void 0===e||"topLeft"!==e&&"topRight"!==e?"slide-up":"slide-down"};t.getTransitionName=function(e,t,r){return void 0!==r?r:"".concat(e,"-").concat(t)};var s=a;t.default=s},74132:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.arrowWidth,r=void 0===t?4:t,n=e.horizontalArrowShift,a=void 0===n?16:n,s=e.verticalArrowShift,c=void 0===s?8:s,f=e.autoAdjustOverflow,d=e.arrowPointAtCenter,h={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(a+r),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(c+r)]},topRight:{points:["br","tc"],offset:[a+r,-4]},rightTop:{points:["tl","cr"],offset:[4,-(c+r)]},bottomRight:{points:["tr","bc"],offset:[a+r,4]},rightBottom:{points:["bl","cr"],offset:[4,c+r]},bottomLeft:{points:["tl","bc"],offset:[-(a+r),4]},leftBottom:{points:["br","cl"],offset:[-4,c+r]}};return Object.keys(h).forEach((function(e){h[e]=d?(0,i.default)((0,i.default)({},h[e]),{overflow:l(f),targetOffset:u}):(0,i.default)((0,i.default)({},o.placements[e]),{overflow:l(f)}),h[e].ignoreShake=!0})),h},t.getOverflowOptions=l;var i=n(r(32716)),o=r(24375),a={adjustX:1,adjustY:1},s={adjustX:0,adjustY:0},u=[0,0];function l(e){return"boolean"==typeof e?e?a:s:(0,i.default)((0,i.default)({},s),e)}},59632:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(r(15188)),o=0,a={};function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=o++,n=t;function s(){(n-=1)<=0?(e(),delete a[r]):a[r]=(0,i.default)(s)}return a[r]=(0,i.default)(s),r}s.cancel=function(e){void 0!==e&&(i.default.cancel(a[e]),delete a[e])},s.ids=a},47419:(e,t,r)=>{"use strict";var n=r(49932).default;Object.defineProperty(t,"__esModule",{value:!0}),t.cloneElement=function(e,t){return a(e,e,t)},t.isFragment=function(e){return e&&o(e)&&e.type===i.Fragment},t.isValidElement=void 0,t.replaceElement=a;var i=n(r(67294)),o=i.isValidElement;function a(e,t,r){return o(e)?i.cloneElement(e,"function"==typeof r?r(e.props||{}):r):t}t.isValidElement=o},67046:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.responsiveMap=t.responsiveArray=t.default=void 0;var i=n(r(23035)),o=n(r(32716));t.responsiveArray=["xxl","xl","lg","md","sm","xs"];var a={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"};t.responsiveMap=a;var s=new Map,u=-1,l={},c={matchHandlers:{},dispatch:function(e){return l=e,s.forEach((function(e){return e(l)})),s.size>=1},subscribe:function(e){return s.size||this.register(),u+=1,s.set(u,e),e(l),u},unsubscribe:function(e){s.delete(e),s.size||this.unregister()},unregister:function(){var e=this;Object.keys(a).forEach((function(t){var r=a[t],n=e.matchHandlers[r];null==n||n.mql.removeListener(null==n?void 0:n.listener)})),s.clear()},register:function(){var e=this;Object.keys(a).forEach((function(t){var r=a[t],n=function(r){var n=r.matches;e.dispatch((0,o.default)((0,o.default)({},l),(0,i.default)({},t,n)))},s=window.matchMedia(r);s.addListener(n),e.matchHandlers[r]={mql:s,listener:n},n(s)}))}};t.default=c},38882:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.detectFlexGapSupported=t.canUseDocElement=void 0,Object.defineProperty(t,"isStyleSupport",{enumerable:!0,get:function(){return a.isStyleSupport}});var i,o=n(r(9440)),a=r(55379),s=function(){return(0,o.default)()&&window.document.documentElement};t.canUseDocElement=s;t.detectFlexGapSupported=function(){if(!s())return!1;if(void 0!==i)return i;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),i=1===e.scrollHeight,document.body.removeChild(e),i}},66764:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tupleNum=t.tuple=void 0;t.tuple=function(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";var n=r(49932).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.noop=o,Object.defineProperty(t,"resetWarned",{enumerable:!0,get:function(){return i.resetWarned}});var i=n(r(88167));function o(){}var a=o;t.default=a},61539:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=i(r(36281)),s=i(r(32925)),u=i(r(21262)),l=i(r(32105)),c=i(r(46362)),f=r(45489),d=r(55608),h=n(r(67294)),p=r(31929),m=i(r(59632)),g=r(47419);function v(e){return!e||null===e.offsetParent||e.hidden}function y(e){return e instanceof Document?e.body:Array.from(e.childNodes).find((function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE}))}function b(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!(t&&t[1]&&t[2]&&t[3])||!(t[1]===t[2]&&t[2]===t[3])}var w=function(e){(0,l.default)(r,e);var t=(0,c.default)(r);function r(){var e;return(0,a.default)(this,r),(e=t.apply(this,arguments)).containerRef=h.createRef(),e.animationStart=!1,e.destroyed=!1,e.onClick=function(t,r){var n,i,a=e.props,s=a.insertExtraNode;if(!a.disabled&&t&&!v(t)&&!t.className.includes("-leave")){e.extraNode=document.createElement("div");var l=(0,u.default)(e).extraNode,c=e.context.getPrefixCls;l.className="".concat(c(""),"-click-animating-node");var d=e.getAttributeName();if(t.setAttribute(d,"true"),r&&"#fff"!==r&&"#ffffff"!==r&&"rgb(255, 255, 255)"!==r&&"rgba(255, 255, 255, 1)"!==r&&b(r)&&!/rgba\((?:\d*, ){3}0\)/.test(r)&&"transparent"!==r){l.style.borderColor=r;var h=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||t.ownerDocument,p=null!==(i=y(h))&&void 0!==i?i:h;o=(0,f.updateCSS)("\n [".concat(c(""),"-click-animating-without-extra-node='true']::after, .").concat(c(""),"-click-animating-node {\n --antd-wave-shadow-color: ").concat(r,";\n }"),"antd-wave",{csp:e.csp,attachTo:p})}s&&t.appendChild(l),["transition","animation"].forEach((function(r){t.addEventListener("".concat(r,"start"),e.onTransitionStart),t.addEventListener("".concat(r,"end"),e.onTransitionEnd)}))}},e.onTransitionStart=function(t){if(!e.destroyed){var r=e.containerRef.current;t&&t.target===r&&!e.animationStart&&e.resetEffect(r)}},e.onTransitionEnd=function(t){t&&"fadeEffect"===t.animationName&&e.resetEffect(t.target)},e.bindAnimationEvent=function(t){if(t&&t.getAttribute&&!t.getAttribute("disabled")&&!t.className.includes("disabled")){var r=function(r){if("INPUT"!==r.target.tagName&&!v(r.target)){e.resetEffect(t);var n=getComputedStyle(t).getPropertyValue("border-top-color")||getComputedStyle(t).getPropertyValue("border-color")||getComputedStyle(t).getPropertyValue("background-color");e.clickWaveTimeoutId=window.setTimeout((function(){return e.onClick(t,n)}),0),m.default.cancel(e.animationStartId),e.animationStart=!0,e.animationStartId=(0,m.default)((function(){e.animationStart=!1}),10)}};return t.addEventListener("click",r,!0),{cancel:function(){t.removeEventListener("click",r,!0)}}}},e.renderWave=function(t){var r=t.csp,n=e.props.children;if(e.csp=r,!h.isValidElement(n))return n;var i=e.containerRef;return(0,d.supportRef)(n)&&(i=(0,d.composeRef)(n.ref,e.containerRef)),(0,g.cloneElement)(n,{ref:i})},e}return(0,s.default)(r,[{key:"componentDidMount",value:function(){this.destroyed=!1;var e=this.containerRef.current;e&&1===e.nodeType&&(this.instance=this.bindAnimationEvent(e))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var e=this.context.getPrefixCls,t=this.props.insertExtraNode;return"".concat(e(""),t?"-click-animating":"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(e){var t=this;if(e&&e!==this.extraNode&&e instanceof Element){var r=this.props.insertExtraNode,n=this.getAttributeName();e.setAttribute(n,"false"),o&&(o.innerHTML=""),r&&this.extraNode&&e.contains(this.extraNode)&&e.removeChild(this.extraNode),["transition","animation"].forEach((function(r){e.removeEventListener("".concat(r,"start"),t.onTransitionStart),e.removeEventListener("".concat(r,"end"),t.onTransitionEnd)}))}}},{key:"render",value:function(){return h.createElement(p.ConfigConsumer,null,this.renderWave)}}]),r}(h.Component);w.contextType=p.ConfigContext;var _=w;t.default=_},27847:(e,t,r)=>{"use strict";var n=r(49932).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SizeContextProvider=void 0;var i=n(r(67294)),o=i.createContext("default");t.SizeContextProvider=function(e){var t=e.children,r=e.size;return i.createElement(o.Consumer,null,(function(e){return i.createElement(o.Provider,{value:r||e},t)}))};var a=o;t.default=a},71511:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(32716)),a=i(r(23035)),s=i(r(40665)),u=i(r(67900)),l=i(r(94184)),c=i(r(11250)),f=r(55608),d=n(r(67294)),h=r(31929),p=i(r(60872)),m=r(67046),g=(i(r(13594)),i(r(27847))),v=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(23035)),a=i(r(94184)),s=i(r(98959)),u=n(r(67294)),l=r(31929),c=i(r(62443)),f=r(47419),d=i(r(71511)),h=r(27847),p=function(e){var t=u.useContext(l.ConfigContext),r=t.getPrefixCls,n=t.direction,i=e.prefixCls,p=e.className,m=void 0===p?"":p,g=e.maxCount,v=e.maxStyle,y=e.size,b=r("avatar-group",i),w=(0,a.default)(b,(0,o.default)({},"".concat(b,"-rtl"),"rtl"===n),m),_=e.children,E=e.maxPopoverPlacement,k=void 0===E?"top":E,C=e.maxPopoverTrigger,M=void 0===C?"hover":C,x=(0,s.default)(_).map((function(e,t){return(0,f.cloneElement)(e,{key:"avatar-key-".concat(t)})})),A=x.length;if(g&&g{"use strict";var n=r(85269).default;t.ZP=void 0;var i=n(r(71511)),o=n(r(51289)),a=i.default;a.Group=o.default;var s=a;t.ZP=s},82815:(e,t,r)=>{"use strict";r(83099),r(98267),r(43378)},1429:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(628)),o=n(r(40225)),a=n(r(67294)),s=function(){return{width:0,opacity:0,transform:"scale(0)"}},u=function(e){return{width:e.scrollWidth,opacity:1,transform:"scale(1)"}},l=function(e){var t=e.prefixCls,r=!!e.loading;return e.existIcon?a.default.createElement("span",{className:"".concat(t,"-loading-icon")},a.default.createElement(i.default,null)):a.default.createElement(o.default,{visible:r,motionName:"".concat(t,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:s,onAppearActive:u,onEnterStart:s,onEnterActive:u,onLeaveStart:u,onLeaveActive:s},(function(e,r){var n=e.className,o=e.style;return a.default.createElement("span",{className:"".concat(t,"-loading-icon"),style:o,ref:r},a.default.createElement(i.default,{className:n}))}))};t.default=l},77677:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GroupSizeContext=void 0;var o=i(r(32716)),a=i(r(23035)),s=i(r(94184)),u=n(r(67294)),l=r(31929),c=(i(r(13594)),function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.convertLegacyProps=function(e){if("danger"===e)return{danger:!0};return{type:e}},t.default=void 0;var o=i(r(32716)),a=i(r(23035)),s=i(r(67900)),u=i(r(40665)),l=i(r(94184)),c=i(r(54406)),f=n(r(67294)),d=r(31929),h=i(r(93319)),p=i(r(3236)),m=r(46549),g=r(47419),v=r(66764),y=(i(r(13594)),i(r(61539))),b=n(r(77677)),w=i(r(1429)),_=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(41954)).default;t.default=i},1025:(e,t,r)=>{"use strict";r(83099),r(57340)},1028:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(25633)).default;t.default=i},93319:(e,t,r)=>{"use strict";var n=r(49932).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DisabledContextProvider=void 0;var i=n(r(67294)),o=i.createContext(!1);t.DisabledContextProvider=function(e){var t=e.children,r=e.disabled,n=i.useContext(o);return i.createElement(o.Provider,{value:null!=r?r:n},t)};var a=o;t.default=a},3236:(e,t,r)=>{"use strict";var n=r(49932).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SizeContextProvider=void 0;var i=n(r(67294)),o=i.createContext(void 0);t.SizeContextProvider=function(e){var t=e.children,r=e.size;return i.createElement(o.Consumer,null,(function(e){return i.createElement(o.Provider,{value:r||e},t)}))};var a=o;t.default=a},7177:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigContext=t.ConfigConsumer=void 0,t.withConfigConsumer=function(e){return function(t){var r=t.constructor;r&&r.displayName||t.name;return function(r){return a.createElement(u,null,(function(n){var i=e.prefixCls,s=(0,n.getPrefixCls)(i,r.prefixCls);return a.createElement(t,(0,o.default)({},n,r,{prefixCls:s}))}))}}};var o=i(r(32716)),a=n(r(67294)),s=a.createContext({getPrefixCls:function(e,t){return t||(e?"ant-".concat(e):"ant")}});t.ConfigContext=s;var u=s.Consumer;t.ConfigConsumer=u},56301:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getStyle=l,t.registerTheme=function(e,t){var r=l(e,t);(0,a.default)()&&(0,s.updateCSS)(r,"".concat(u,"-dynamic-theme"))};var i=r(92138),o=r(79176),a=n(r(9440)),s=r(45489),u=(n(r(13594)),"-ant-".concat(Date.now(),"-").concat(Math.random()));function l(e,t){var r={},n=function(e,t){var r=e.clone();return(r=(null==t?void 0:t(r))||r).toRgbString()},a=function(e,t){var a=new o.TinyColor(e),s=(0,i.generate)(a.toRgbString());r["".concat(t,"-color")]=n(a),r["".concat(t,"-color-disabled")]=s[1],r["".concat(t,"-color-hover")]=s[4],r["".concat(t,"-color-active")]=s[6],r["".concat(t,"-color-outline")]=a.clone().setAlpha(.2).toRgbString(),r["".concat(t,"-color-deprecated-bg")]=s[0],r["".concat(t,"-color-deprecated-border")]=s[2]};if(t.primaryColor){a(t.primaryColor,"primary");var s=new o.TinyColor(t.primaryColor),u=(0,i.generate)(s.toRgbString());u.forEach((function(e,t){r["primary-".concat(t+1)]=e})),r["primary-color-deprecated-l-35"]=n(s,(function(e){return e.lighten(35)})),r["primary-color-deprecated-l-20"]=n(s,(function(e){return e.lighten(20)})),r["primary-color-deprecated-t-20"]=n(s,(function(e){return e.tint(20)})),r["primary-color-deprecated-t-50"]=n(s,(function(e){return e.tint(50)})),r["primary-color-deprecated-f-12"]=n(s,(function(e){return e.setAlpha(.12*e.getAlpha())}));var l=new o.TinyColor(u[0]);r["primary-color-active-deprecated-f-30"]=n(l,(function(e){return e.setAlpha(.3*e.getAlpha())})),r["primary-color-active-deprecated-d-02"]=n(l,(function(e){return e.darken(2)}))}t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info");var c=Object.keys(r).map((function(t){return"--".concat(e,"-").concat(t,": ").concat(r[t],";")}));return"\n :root {\n ".concat(c.join("\n"),"\n }\n ").trim()}},31929:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ConfigConsumer",{enumerable:!0,get:function(){return m.ConfigConsumer}}),Object.defineProperty(t,"ConfigContext",{enumerable:!0,get:function(){return m.ConfigContext}}),t.globalConfig=t.defaultPrefixCls=t.defaultIconPrefixCls=t.default=t.configConsumerProps=void 0;var o=i(r(32716)),a=i(r(98399)),s=i(r(92948)),u=n(r(67294)),l=i(r(2197)),c=n(r(53594)),f=i(r(73625)),d=i(r(56350)),h=i(r(11187)),p=i(r(16318)),m=r(7177),g=r(56301),v=r(93319),y=n(r(3236));t.configConsumerProps=["getTargetContainer","getPopupContainer","rootPrefixCls","getPrefixCls","renderEmpty","csp","autoInsertSpaceInButton","locale","pageHeader"];var b=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form"];t.defaultPrefixCls="ant";var w,_,E="anticon";function k(){return w||"ant"}function C(){return _||E}t.defaultIconPrefixCls=E;t.globalConfig=function(){return{getPrefixCls:function(e,t){return t||(e?"".concat(k(),"-").concat(e):k())},getIconPrefixCls:C,getRootPrefixCls:function(e,t){return e||(w||(t&&t.includes("-")?t.replace(/^(.*)-[^-]*$/,"$1"):k()))}}};var M=function(e){var t,r,n=e.children,i=e.csp,f=e.autoInsertSpaceInButton,h=e.form,p=e.locale,g=e.componentSize,w=e.direction,_=e.space,E=e.virtual,k=e.dropdownMatchSelectWidth,C=e.legacyLocale,M=e.parentContext,x=e.iconPrefixCls,A=e.componentDisabled,S=u.useCallback((function(t,r){var n=e.prefixCls;if(r)return r;var i=n||M.getPrefixCls("");return t?"".concat(i,"-").concat(t):i}),[M.getPrefixCls,e.prefixCls]),O=(0,o.default)((0,o.default)({},M),{csp:i,autoInsertSpaceInButton:f,locale:p||C,direction:w,space:_,virtual:E,dropdownMatchSelectWidth:k,getPrefixCls:S});b.forEach((function(t){var r=e[t];r&&(O[t]=r)}));var P=(0,s.default)((function(){return O}),O,(function(e,t){var r=Object.keys(e),n=Object.keys(t);return r.length!==n.length||r.some((function(r){return e[r]!==t[r]}))})),N=u.useMemo((function(){return{prefixCls:x,csp:i}}),[x,i]),T=n,I={};return p&&(I=(null===(t=p.Form)||void 0===t?void 0:t.defaultValidateMessages)||(null===(r=d.default.Form)||void 0===r?void 0:r.defaultValidateMessages)||{}),h&&h.validateMessages&&(I=(0,o.default)((0,o.default)({},I),h.validateMessages)),Object.keys(I).length>0&&(T=u.createElement(l.default.Provider,{value:I},n)),p&&(T=u.createElement(c.default,{locale:p,_ANT_MARK__:c.ANT_MARK},T)),(x||i)&&(T=u.createElement(a.default.Provider,{value:N},T)),g&&(T=u.createElement(y.SizeContextProvider,{size:g},T)),void 0!==A&&(T=u.createElement(v.DisabledContextProvider,{disabled:A},T)),u.createElement(m.ConfigContext.Provider,{value:P},T)},x=function(e){return u.useEffect((function(){e.direction&&(h.default.config({rtl:"rtl"===e.direction}),p.default.config({rtl:"rtl"===e.direction}))}),[e.direction]),u.createElement(f.default,null,(function(t,r,n){return u.createElement(m.ConfigConsumer,null,(function(t){return u.createElement(M,(0,o.default)({parentContext:t,legacyLocale:n},e))}))}))};x.ConfigContext=m.ConfigContext,x.SizeContext=y.default,x.config=function(e){var t=e.prefixCls,r=e.iconPrefixCls,n=e.theme;void 0!==t&&(w=t),void 0!==r&&(_=r),n&&(0,g.registerTheme)(k(),n)};var A=x;t.default=A},82932:(e,t,r)=>{"use strict";r(80256)},25633:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(32716)),o=n(r(27590)),a=n(r(52040)),s={lang:(0,i.default)({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},o.default),timePickerLocale:(0,i.default)({},a.default)};t.default=s},51130:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.NoStyleItemContext=t.NoFormStyle=t.FormProvider=t.FormItemPrefixContext=t.FormItemInputContext=t.FormContext=void 0;var o=i(r(32716)),a=r(78721),s=i(r(54406)),u=n(r(67294)),l=u.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}});t.FormContext=l;var c=u.createContext(null);t.NoStyleItemContext=c;t.FormProvider=function(e){var t=(0,s.default)(e,["prefixCls"]);return u.createElement(a.FormProvider,(0,o.default)({},t))};var f=u.createContext({prefixCls:""});t.FormItemPrefixContext=f;var d=u.createContext({});t.FormItemInputContext=d;t.NoFormStyle=function(e){var t=e.children,r=e.status,n=e.override,i=(0,u.useContext)(d),a=(0,u.useMemo)((function(){var e=(0,o.default)({},i);return n&&delete e.isFormItemInput,r&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[r,n,i]);return u.createElement(d.Provider,{value:a},t)}},2197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(67294).createContext)(void 0);t.default=n},60872:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(67294),o=n(r(23854)),a=n(r(67046));var s=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=(0,i.useRef)({}),r=(0,o.default)();return(0,i.useEffect)((function(){var n=a.default.subscribe((function(n){t.current=n,e&&r()}));return function(){return a.default.unsubscribe(n)}}),[]),t.current};t.default=s},58511:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.icons=t.default=void 0;var o=i(r(32716)),a=i(r(40665)),s=i(r(40753)),u=i(r(68229)),l=i(r(67638)),c=i(r(92790)),f=i(r(48794)),d=i(r(39936)),h=i(r(68287)),p=i(r(89941)),m=n(r(67294)),g=r(31929),v=r(53683),y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;t.Z=void 0;var o=i(r(32716)),a=i(r(40665)),s=i(r(29918)),u=i(r(89941)),l=n(r(67294)),c=r(31929),f=i(r(18253)),d=r(53683),h=n(r(58511)),p=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";r(83099),r(17833)},87412:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SiderContext=void 0;var o=i(r(23035)),a=i(r(32716)),s=i(r(67900)),u=i(r(54067)),l=i(r(68229)),c=i(r(67638)),f=i(r(94184)),d=i(r(54406)),h=n(r(67294)),p=r(31929),m=i(r(63406)),g=r(62704),v=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i0&&void 0!==arguments[0]?arguments[0]:"";return e+=1,"".concat(t).concat(e)}}();var _=h.forwardRef((function(e,t){var r=e.prefixCls,n=e.className,i=e.trigger,_=e.children,E=e.defaultCollapsed,k=void 0!==E&&E,C=e.theme,M=void 0===C?"dark":C,x=e.style,A=void 0===x?{}:x,S=e.collapsible,O=void 0!==S&&S,P=e.reverseArrow,N=void 0!==P&&P,T=e.width,I=void 0===T?200:T,R=e.collapsedWidth,B=void 0===R?80:R,L=e.zeroWidthTriggerStyle,j=e.breakpoint,D=e.onCollapse,F=e.onBreakpoint,U=v(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),z=(0,h.useContext)(g.LayoutContext).siderHook,q=(0,h.useState)("collapsed"in U?U.collapsed:k),V=(0,s.default)(q,2),H=V[0],G=V[1],Z=(0,h.useState)(!1),W=(0,s.default)(Z,2),K=W[0],$=W[1];(0,h.useEffect)((function(){"collapsed"in U&&G(U.collapsed)}),[U.collapsed]);var Q=function(e,t){"collapsed"in U||G(e),null==D||D(e,t)},Y=(0,h.useRef)();Y.current=function(e){$(e.matches),null==F||F(e.matches),H!==e.matches&&Q(e.matches,"responsive")},(0,h.useEffect)((function(){function e(e){return Y.current(e)}var t;if("undefined"!=typeof window){var r=window.matchMedia;if(r&&j&&j in y){t=r("(max-width: ".concat(y[j],")"));try{t.addEventListener("change",e)}catch(r){t.addListener(e)}e(t)}}return function(){try{null==t||t.removeEventListener("change",e)}catch(r){null==t||t.removeListener(e)}}}),[j]),(0,h.useEffect)((function(){var e=w("ant-sider-");return z.addSider(e),function(){return z.removeSider(e)}}),[]);var J,X,ee,te,re,ne,ie,oe,ae,se,ue=function(){Q(!H,"clickTrigger")},le=(0,h.useContext)(p.ConfigContext).getPrefixCls,ce=h.useMemo((function(){return{siderCollapsed:H}}),[H]);return h.createElement(b.Provider,{value:ce},(X=le("layout-sider",r),ee=(0,d.default)(U,["collapsed"]),te=H?B:I,re=(0,m.default)(te)?"".concat(te,"px"):String(te),ne=0===parseFloat(String(B||0))?h.createElement("span",{onClick:ue,className:(0,f.default)("".concat(X,"-zero-width-trigger"),"".concat(X,"-zero-width-trigger-").concat(N?"right":"left")),style:L},i||h.createElement(u.default,null)):null,ie={expanded:N?h.createElement(c.default,null):h.createElement(l.default,null),collapsed:N?h.createElement(l.default,null):h.createElement(c.default,null)}[H?"collapsed":"expanded"],oe=null!==i?ne||h.createElement("div",{className:"".concat(X,"-trigger"),onClick:ue,style:{width:re}},i||ie):null,ae=(0,a.default)((0,a.default)({},A),{flex:"0 0 ".concat(re),maxWidth:re,minWidth:re,width:re}),se=(0,f.default)(X,"".concat(X,"-").concat(M),(J={},(0,o.default)(J,"".concat(X,"-collapsed"),!!H),(0,o.default)(J,"".concat(X,"-has-trigger"),O&&null!==i&&!ne),(0,o.default)(J,"".concat(X,"-below"),!!K),(0,o.default)(J,"".concat(X,"-zero-width"),0===parseFloat(re)),J),n),h.createElement("aside",(0,a.default)({className:se},ee,{style:ae,ref:t}),h.createElement("div",{className:"".concat(X,"-children")},_),O||K&&ne?oe:null)))}));t.default=_},16373:(e,t,r)=>{"use strict";var n=r(85269).default,i=r(49932).default;t.Z=void 0;var o=i(r(62704)),a=n(r(87412)),s=o.default;s.Header=o.Header,s.Footer=o.Footer,s.Content=o.Content,s.Sider=a.default;var u=s;t.Z=u},62704:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LayoutContext=t.Header=t.Footer=t.Content=void 0;var o=i(r(32354)),a=i(r(23035)),s=i(r(67900)),u=i(r(32716)),l=i(r(94184)),c=n(r(67294)),f=r(31929),d=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i0),(0,a.default)(r,"".concat(v,"-rtl"),"rtl"===n),r),y),C=c.useMemo((function(){return{siderHook:{addSider:function(e){g((function(t){return[].concat((0,o.default)(t),[e])}))},removeSider:function(e){g((function(t){return t.filter((function(t){return t!==e}))}))}}}}),[]);return c.createElement(h.Provider,{value:C},c.createElement(_,(0,u.default)({ref:t,className:k},E),b))})),v=p({suffixCls:"layout",tagName:"section",displayName:"Layout"})(g),y=p({suffixCls:"layout-header",tagName:"header",displayName:"Header"})(m);t.Header=y;var b=p({suffixCls:"layout-footer",tagName:"footer",displayName:"Footer"})(m);t.Footer=b;var w=p({suffixCls:"layout-content",tagName:"main",displayName:"Content"})(m);t.Content=w;var _=v;t.default=_},73431:(e,t,r)=>{"use strict";r(83099),r(2909)},73625:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.useLocaleReceiver=t.default=void 0;var o=i(r(32716)),a=n(r(67294)),s=i(r(89354)),u=i(r(95209)),l=function(e){var t=e.componentName,r=void 0===t?"global":t,n=e.defaultLocale,i=e.children,l=a.useContext(s.default);return i(a.useMemo((function(){var e,t=n||u.default[r],i=null!==(e=null==l?void 0:l[r])&&void 0!==e?e:{};return(0,o.default)((0,o.default)({},t instanceof Function?t():t),i||{})}),[r,n,l]),a.useMemo((function(){var e=l&&l.locale;return l&&l.exist&&!e?u.default.locale:e}),[l]),l)};t.default=l;t.useLocaleReceiver=function(e,t){var r=a.useContext(s.default);return[a.useMemo((function(){var n,i=t||u.default[e],a=null!==(n=null==r?void 0:r[e])&&void 0!==n?n:{};return(0,o.default)((0,o.default)({},"function"==typeof i?i():i),a||{})}),[e,t,r])]}},89354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(67294).createContext)(void 0);t.default=n},95209:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(56350)).default;t.default=i},53594:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ANT_MARK=void 0;var o=i(r(32716)),a=n(r(67294)),s=(i(r(13594)),r(10625)),u=i(r(89354));t.ANT_MARK="internalMark";var l=function(e){var t=e.locale,r=void 0===t?{}:t,n=e.children;e._ANT_MARK__;a.useEffect((function(){return(0,s.changeConfirmLocale)(r&&r.Modal),function(){(0,s.changeConfirmLocale)()}}),[r]);var i=a.useMemo((function(){return(0,o.default)((0,o.default)({},r),{exist:!0})}),[r]);return a.createElement(u.default.Provider,{value:i},n)};t.default=l},56350:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(62273)),o=n(r(1028)),a=n(r(25633)),s=n(r(52040)),u="${label} is not a valid ${type}",l={locale:"en",Pagination:i.default,DatePicker:a.default,TimePicker:s.default,Calendar:o.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:u,method:u,array:u,object:u,number:u,date:u,boolean:u,integer:u,float:u,regexp:u,email:u,url:u,hex:u},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}};t.default=l},18253:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(56350)).default;t.default=i},22493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(67294).createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});t.default=n},24421:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(32716)),a=i(r(23035)),s=i(r(94184)),u=r(66308),l=n(r(67294)),c=r(31929),f=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(23035)),a=i(r(32716)),s=i(r(36281)),u=i(r(32925)),l=i(r(32105)),c=i(r(46362)),f=i(r(94184)),d=r(66308),h=i(r(98959)),p=n(r(67294)),m=r(87412),g=i(r(94055)),v=r(47419),y=i(r(22493)),b=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.OverrideProvider=void 0;var o=i(r(32716)),a=n(r(67294)),s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(32716)),a=i(r(94184)),s=r(66308),u=i(r(54406)),l=n(r(67294)),c=r(47419),f=i(r(22493));var d=function(e){var t,r,n=e.popupClassName,i=e.icon,d=e.title,h=e.theme,p=l.useContext(f.default),m=p.prefixCls,g=p.inlineCollapsed,v=p.antdMenuTheme,y=(0,s.useFullPath)();if(i){var b=(0,c.isValidElement)(d)&&"span"===d.type;r=l.createElement(l.Fragment,null,(0,c.cloneElement)(i,{className:(0,a.default)((0,c.isValidElement)(i)?null===(t=i.props)||void 0===t?void 0:t.className:"","".concat(m,"-item-icon"))}),b?d:l.createElement("span",{className:"".concat(m,"-title-content")},d))}else r=g&&!y.length&&d&&"string"==typeof d?l.createElement("div",{className:"".concat(m,"-inline-collapsed-noicon")},d.charAt(0)):l.createElement("span",{className:"".concat(m,"-title-content")},d);var w=l.useMemo((function(){return(0,o.default)((0,o.default)({},p),{firstLevel:!1})}),[p]);return l.createElement(f.default.Provider,{value:w},l.createElement(s.SubMenu,(0,o.default)({},(0,u.default)(e,["icon"]),{title:r,popupClassName:(0,a.default)(m,"".concat(m,"-").concat(h||v),n)})))};t.default=d},88535:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return u.useMemo((function(){return e?h(e):e}),[e])};var o=i(r(32716)),a=i(r(40665)),s=r(66308),u=n(r(67294)),l=i(r(24421)),c=i(r(51005)),f=i(r(78966)),d=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(36281)),a=i(r(32925)),s=i(r(32105)),u=i(r(46362)),l=i(r(32716)),c=i(r(26937)),f=i(r(94184)),d=n(r(66308)),h=i(r(90703)),p=i(r(54406)),m=n(r(67294)),g=r(31929),v=r(87412),y=i(r(53683)),b=r(47419),w=(i(r(13594)),i(r(88535))),_=i(r(22493)),E=i(r(24421)),k=i(r(51005)),C=i(r(2639)),M=i(r(78966)),x=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";r(83099),r(98814),r(15086)},64333:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(){var r,n,i=null,f={add:function(e,t){null==i||i.component.add(e,t)}},d=(0,s.default)(f),h=(0,a.default)(d,2),p=h[0],m=h[1];var g=u.useRef({});return g.current.open=function(a){var s=a.prefixCls,u=r("message",s),c=r(),f=a.key||(0,l.getKeyThenIncreaseKey)(),d=new Promise((function(r){var s=function(){return"function"==typeof a.onClose&&a.onClose(),r(!0)};e((0,o.default)((0,o.default)({},a),{prefixCls:u,rootPrefixCls:c,getPopupContainer:n}),(function(e){var r=e.prefixCls,n=e.instance;i=n,p(t((0,o.default)((0,o.default)({},a),{key:f,onClose:s}),r))}))})),h=function(){i&&i.removeNotice(f)};return h.then=function(e,t){return d.then(e,t)},h.promise=d,h},l.typeList.forEach((function(e){return(0,l.attachTypeApi)(g.current,e)})),[g.current,u.createElement(c.ConfigConsumer,{key:"holder"},(function(e){return r=e.getPrefixCls,n=e.getPopupContainer,m}))]}};var o=i(r(32716)),a=i(r(67900)),s=i(r(45484)),u=n(r(67294)),l=r(11187),c=r(31929)},11187:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.attachTypeApi=I,t.getInstance=t.default=void 0,t.getKeyThenIncreaseKey=A,t.typeList=void 0;var o,a,s,u,l=i(r(32716)),c=i(r(23035)),f=i(r(37431)),d=i(r(42547)),h=i(r(42461)),p=i(r(94354)),m=i(r(628)),g=i(r(94184)),v=i(r(59691)),y=n(r(67294)),b=n(r(31929)),w=i(r(64333)),_=3,E=1,k="",C="move-up",M=!1,x=!1;function A(){return E++}function S(e,t){var r=e.prefixCls,n=e.getPopupContainer,i=(0,b.globalConfig)(),l=i.getPrefixCls,c=i.getRootPrefixCls,f=i.getIconPrefixCls,d=l("message",r||k),h=c(e.rootPrefixCls,d),p=f();if(o)t({prefixCls:d,rootPrefixCls:h,iconPrefixCls:p,instance:o});else{var m={prefixCls:d,transitionName:M?C:"".concat(h,"-").concat(C),style:{top:a},getContainer:s||n,maxCount:u};v.default.newInstance(m,(function(e){o?t({prefixCls:d,rootPrefixCls:h,iconPrefixCls:p,instance:o}):(o=e,t({prefixCls:d,rootPrefixCls:h,iconPrefixCls:p,instance:e}))}))}}var O={info:p.default,success:f.default,error:d.default,warning:h.default,loading:m.default},P=Object.keys(O);function N(e,t,r){var n,i=void 0!==e.duration?e.duration:_,o=O[e.type],a=(0,g.default)("".concat(t,"-custom-content"),(n={},(0,c.default)(n,"".concat(t,"-").concat(e.type),e.type),(0,c.default)(n,"".concat(t,"-rtl"),!0===x),n));return{key:e.key,duration:i,style:e.style||{},className:e.className,content:y.createElement(b.default,{iconPrefixCls:r},y.createElement("div",{className:a},e.icon||o&&y.createElement(o,null),y.createElement("span",null,e.content))),onClose:e.onClose,onClick:e.onClick}}t.typeList=P;var T={open:function(e){var t=e.key||A(),r=new Promise((function(r){var n=function(){return"function"==typeof e.onClose&&e.onClose(),r(!0)};S(e,(function(r){var i=r.prefixCls,o=r.iconPrefixCls;r.instance.notice(N((0,l.default)((0,l.default)({},e),{key:t,onClose:n}),i,o))}))})),n=function(){var r;o&&(o.removeNotice(t),null===(r=e.onClose)||void 0===r||r.call(e))};return n.then=function(e,t){return r.then(e,t)},n.promise=r,n},config:function(e){void 0!==e.top&&(a=e.top,o=null),void 0!==e.duration&&(_=e.duration),void 0!==e.prefixCls&&(k=e.prefixCls),void 0!==e.getContainer&&(s=e.getContainer,o=null),void 0!==e.transitionName&&(C=e.transitionName,o=null,M=!0),void 0!==e.maxCount&&(u=e.maxCount,o=null),void 0!==e.rtl&&(x=e.rtl)},destroy:function(e){if(o)if(e){(0,o.removeNotice)(e)}else{var t=o.destroy;t(),o=null}}};function I(e,t){e[t]=function(r,n,i){return function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!!e.content}(r)?e.open((0,l.default)((0,l.default)({},r),{type:t})):("function"==typeof n&&(i=n,n=void 0),e.open({content:r,duration:n,type:t,onClose:i}))}}P.forEach((function(e){return I(T,e)})),T.warn=T.warning,T.useMessage=(0,w.default)(S,N);t.getInstance=function(){return null};var R=T;t.default=R},75314:(e,t,r)=>{"use strict";r(83099),r(44362)},80654:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(23035)),a=i(r(94184)),s=n(r(67294)),u=i(r(31929)),l=i(r(6459)),c=r(53683),f=(i(r(13594)),i(r(83663))),d=function(e){var t=e.icon,r=e.onCancel,n=e.onOk,i=e.close,d=e.zIndex,h=e.afterClose,p=e.visible,m=e.open,g=e.keyboard,v=e.centered,y=e.getContainer,b=e.maskStyle,w=e.okText,_=e.okButtonProps,E=e.cancelText,k=e.cancelButtonProps,C=e.direction,M=e.prefixCls,x=e.wrapClassName,A=e.rootPrefixCls,S=e.iconPrefixCls,O=e.bodyStyle,P=e.closable,N=void 0!==P&&P,T=e.closeIcon,I=e.modalRender,R=e.focusTriggerAfterClose;var B=e.okType||"primary",L="".concat(M,"-confirm"),j=!("okCancel"in e)||e.okCancel,D=e.width||416,F=e.style||{},U=void 0===e.mask||e.mask,z=void 0!==e.maskClosable&&e.maskClosable,q=null!==e.autoFocusButton&&(e.autoFocusButton||"ok"),V=(0,a.default)(L,"".concat(L,"-").concat(e.type),(0,o.default)({},"".concat(L,"-rtl"),"rtl"===C),e.className),H=j&&s.createElement(l.default,{actionFn:r,close:i,autoFocus:"cancel"===q,buttonProps:k,prefixCls:"".concat(A,"-btn")},E);return s.createElement(u.default,{prefixCls:A,iconPrefixCls:S,direction:C},s.createElement(f.default,{prefixCls:M,className:V,wrapClassName:(0,a.default)((0,o.default)({},"".concat(L,"-centered"),!!e.centered),x),onCancel:function(){return null==i?void 0:i({triggerCancel:!0})},open:m||p,title:"",footer:"",transitionName:(0,c.getTransitionName)(A,"zoom",e.transitionName),maskTransitionName:(0,c.getTransitionName)(A,"fade",e.maskTransitionName),mask:U,maskClosable:z,maskStyle:b,style:F,bodyStyle:O,width:D,zIndex:d,afterClose:h,keyboard:g,centered:v,getContainer:y,closable:N,closeIcon:T,modalRender:I,focusTriggerAfterClose:R},s.createElement("div",{className:"".concat(L,"-body-wrapper")},s.createElement("div",{className:"".concat(L,"-body")},t,void 0===e.title?null:s.createElement("span",{className:"".concat(L,"-title")},e.title),s.createElement("div",{className:"".concat(L,"-content")},e.content)),s.createElement("div",{className:"".concat(L,"-btns")},H,s.createElement(l.default,{type:B,actionFn:n,close:i,autoFocus:"ok"===q,buttonProps:_,prefixCls:"".concat(A,"-btn")},w)))))};t.default=d},83663:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=i(r(23035)),s=i(r(32716)),u=i(r(40753)),l=i(r(94184)),c=i(r(76154)),f=n(r(67294)),d=i(r(65400)),h=r(41954),p=r(31929),m=r(51130),g=i(r(73625)),v=r(46549),y=r(53683),b=r(38882),w=(i(r(13594)),r(10625)),_=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,r=document.createDocumentFragment(),n=(0,a.default)((0,a.default)({},e),{close:u,open:!0});function i(){for(var t=arguments.length,n=new Array(t),i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=[];t.default=r},56697:(e,t,r)=>{"use strict";var n=r(85269).default,i=r(49932).default;t.Z=void 0;var o=i(r(28368)),a=n(r(23781)),s=n(r(83663)),u=n(r(87891));function l(e){return(0,o.default)((0,o.withWarn)(e))}var c=s.default;c.useModal=u.default,c.info=function(e){return(0,o.default)((0,o.withInfo)(e))},c.success=function(e){return(0,o.default)((0,o.withSuccess)(e))},c.error=function(e){return(0,o.default)((0,o.withError)(e))},c.warning=l,c.warn=l,c.confirm=function(e){return(0,o.default)((0,o.withConfirm)(e))},c.destroyAll=function(){for(;a.default.length;){var e=a.default.pop();e&&e()}},c.config=o.modalGlobalConfig;var f=c;t.Z=f},10625:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.changeConfirmLocale=function(e){a=e?(0,i.default)((0,i.default)({},a),e):(0,i.default)({},o.default.Modal)},t.getConfirmLocale=function(){return a};var i=n(r(32716)),o=n(r(56350)),a=(0,i.default)({},o.default.Modal)},53294:(e,t,r)=>{"use strict";r(83099),r(81098),r(1025)},20239:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(32716)),a=i(r(32354)),s=i(r(67900)),u=n(r(67294)),l=r(31929),c=i(r(73625)),f=i(r(56350)),d=i(r(80654)),h=function(e,t){var r=e.afterClose,n=e.config,i=u.useState(!0),h=(0,s.default)(i,2),p=h[0],m=h[1],g=u.useState(n),v=(0,s.default)(g,2),y=v[0],b=v[1],w=u.useContext(l.ConfigContext),_=w.direction,E=w.getPrefixCls,k=E("modal"),C=E(),M=function(){m(!1);for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=s.useRef(null),t=s.useState([]),r=(0,a.default)(t,2),n=r[0],i=r[1];s.useEffect((function(){n.length&&((0,o.default)(n).forEach((function(e){e()})),i([]))}),[n]);var u=s.useCallback((function(t){return function(r){var n;f+=1;var a,u=s.createRef(),l=s.createElement(c.default,{key:"modal-".concat(f),config:t(r),ref:u,afterClose:function(){null==a||a()}});return a=null===(n=e.current)||void 0===n?void 0:n.patchElement(l),{destroy:function(){function e(){var e;null===(e=u.current)||void 0===e||e.destroy()}u.current?e():i((function(t){return[].concat((0,o.default)(t),[e])}))},update:function(e){function t(){var t;null===(t=u.current)||void 0===t||t.update(e)}u.current?t():i((function(e){return[].concat((0,o.default)(e),[t])}))}}}}),[]);return[s.useMemo((function(){return{info:u(l.withInfo),success:u(l.withSuccess),error:u(l.withError),warning:u(l.withWarn),confirm:u(l.withConfirm)}}),[]),s.createElement(d,{ref:e})]};var o=i(r(32354)),a=i(r(67900)),s=n(r(67294)),u=i(r(44104)),l=r(28368),c=i(r(20239)),f=0,d=s.memo(s.forwardRef((function(e,t){var r=(0,u.default)(),n=(0,a.default)(r,2),i=n[0],o=n[1];return s.useImperativeHandle(t,(function(){return{patchElement:o}}),[]),s.createElement(s.Fragment,null,i)})))},23298:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(){var r,n=null,i={add:function(e,t){null==n||n.component.add(e,t)}},c=(0,s.default)(i),f=(0,a.default)(c,2),d=f[0],h=f[1];var p=u.useRef({});return p.current.open=function(i){var a=i.prefixCls,s=r("notification",a);e((0,o.default)((0,o.default)({},i),{prefixCls:s}),(function(e){var r=e.prefixCls,o=e.instance;n=o,d(t(i,r))}))},["success","info","warning","error"].forEach((function(e){p.current[e]=function(t){return p.current.open((0,o.default)((0,o.default)({},t),{type:e}))}})),[p.current,u.createElement(l.ConfigConsumer,{key:"holder"},(function(e){return r=e.getPrefixCls,h}))]}};var o=i(r(32716)),a=i(r(67900)),s=i(r(45484)),u=n(r(67294)),l=r(31929)},16318:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getInstance=t.default=void 0;var o,a,s,u=i(r(86336)),l=i(r(32716)),c=i(r(23035)),f=i(r(67996)),d=i(r(74337)),h=i(r(40753)),p=i(r(67039)),m=i(r(93201)),g=i(r(94184)),v=i(r(59691)),y=n(r(67294)),b=n(r(31929)),w=i(r(23298)),_=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},E={},k=4.5,C=24,M=24,x="",A="topRight",S=!1;function O(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:M;switch(e){case"top":t={left:"50%",transform:"translateX(-50%)",right:"auto",top:r,bottom:"auto"};break;case"topLeft":t={left:0,top:r,bottom:"auto"};break;case"topRight":t={right:0,top:r,bottom:"auto"};break;case"bottom":t={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":t={left:0,top:"auto",bottom:n};break;default:t={right:0,top:"auto",bottom:n}}return t}function P(e,t){var r=e.placement,n=void 0===r?A:r,i=e.top,a=e.bottom,u=e.getContainer,l=void 0===u?o:u,f=e.prefixCls,d=(0,b.globalConfig)(),h=d.getPrefixCls,p=d.getIconPrefixCls,m=h("notification",f||x),y=p(),w="".concat(m,"-").concat(n),_=E[w];if(_)Promise.resolve(_).then((function(e){t({prefixCls:"".concat(m,"-notice"),iconPrefixCls:y,instance:e})}));else{var k=(0,g.default)("".concat(m,"-").concat(n),(0,c.default)({},"".concat(m,"-rtl"),!0===S));E[w]=new Promise((function(e){v.default.newInstance({prefixCls:m,className:k,style:O(n,i,a),getContainer:l,maxCount:s},(function(r){e(r),t({prefixCls:"".concat(m,"-notice"),iconPrefixCls:y,instance:r})}))}))}}var N={success:f.default,info:m.default,error:d.default,warning:p.default};function T(e,t,r){var n=e.duration,i=e.icon,o=e.type,s=e.description,u=e.message,l=e.btn,f=e.onClose,d=e.onClick,p=e.key,m=e.style,v=e.className,w=e.closeIcon,_=void 0===w?a:w,E=e.props,C=void 0===n?k:n,M=null;i?M=y.createElement("span",{className:"".concat(t,"-icon")},e.icon):o&&(M=y.createElement(N[o]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(o)}));var x=void 0===_?y.createElement("span",{className:"".concat(t,"-close-x")},y.createElement(h.default,{className:"".concat(t,"-close-icon")})):_,A=!s&&M?y.createElement("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:y.createElement(b.default,{iconPrefixCls:r},y.createElement("div",{className:M?"".concat(t,"-with-icon"):"",role:"alert"},M,y.createElement("div",{className:"".concat(t,"-message")},A,u),y.createElement("div",{className:"".concat(t,"-description")},s),l?y.createElement("span",{className:"".concat(t,"-btn")},l):null)),duration:C,closable:!0,closeIcon:x,onClose:f,onClick:d,key:p,style:m||{},className:(0,g.default)(v,(0,c.default)({},"".concat(t,"-").concat(o),!!o)),props:E}}var I={open:function(e){P(e,(function(t){var r=t.prefixCls,n=t.iconPrefixCls;t.instance.notice(T(e,r,n))}))},close:function(e){Object.keys(E).forEach((function(t){return Promise.resolve(E[t]).then((function(t){t.removeNotice(e)}))}))},config:function(e){var t=e.duration,r=e.placement,n=e.bottom,i=e.top,u=e.getContainer,l=e.closeIcon,c=e.prefixCls;void 0!==c&&(x=c),void 0!==t&&(k=t),void 0!==r?A=r:e.rtl&&(A="topLeft"),void 0!==n&&(M=n),void 0!==i&&(C=i),void 0!==u&&(o=u),void 0!==l&&(a=l),void 0!==e.rtl&&(S=e.rtl),void 0!==e.maxCount&&(s=e.maxCount)},destroy:function(){Object.keys(E).forEach((function(e){Promise.resolve(E[e]).then((function(e){e.destroy()})),delete E[e]}))}};["success","info","warning","error"].forEach((function(e){I[e]=function(t){return I.open((0,l.default)((0,l.default)({},t),{type:e}))}})),I.warn=I.warning,I.useNotification=(0,w.default)(P,T);t.getInstance=function(e){return _(void 0,void 0,void 0,(0,u.default)().mark((function e(){return(0,u.default)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})))};var R=I;t.default=R},94125:(e,t,r)=>{"use strict";r(83099),r(43826)},62443:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(32716)),a=n(r(67294)),s=r(70502),u=r(53683),l=r(31929),c=i(r(94055)),f=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";r(83099),r(86924)},46549:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.useCompactItemContext=t.default=t.SpaceCompactItemContext=t.NoCompactStyle=void 0;var o=i(r(32716)),a=i(r(23035)),s=i(r(94184)),u=i(r(98959)),l=n(r(67294)),c=r(31929),f=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.className,r=e.direction,n=e.index,i=e.marginDirection,l=e.children,c=e.split,f=e.wrap,d=s.useContext(u.SpaceContext),h=d.horizontalSize,p=d.verticalSize,m=d.latestIndex,g=d.supportFlexGap,v={};g||("vertical"===r?n{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SpaceContext=void 0;var o=i(r(32716)),a=i(r(23035)),s=i(r(67900)),u=i(r(94184)),l=i(r(98959)),c=n(r(67294)),f=r(31929),d=i(r(87855)),h=i(r(98919)),p=i(r(46549)),m=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";r(83099),r(72413)},52040:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};t.default=r},94055:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(23035)),a=i(r(67900)),s=i(r(32716)),u=i(r(94184)),l=i(r(64178)),c=i(r(52904)),f=n(r(67294)),d=r(31929),h=r(45471),p=r(53683),m=i(r(74132)),g=r(47419),v=(i(r(13594)),function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{"use strict";r(83099),r(62897)},40225:(e,t,r)=>{"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(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 o(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rSe,Provider:()=>v,default:()=>Oe});var l=r(94184),c=r.n(l),f=r(79292),d=r(41531),h=r(67294);function p(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var m=["children"],g=h.createContext({});function v(e){var t=e.children,r=p(e,m);return h.createElement(g.Provider,{value:r},t)}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:1,r=ae+=1;function n(t){if(0===t)ue(r),e();else{var i=ie((function(){n(t-1)}));se.set(r,i)}}return n(t),r};le.cancel=function(e){var t=se.get(e);return ue(t),oe(t)};const ce=le;var fe=[L,j,D,F],de=[L,U];function he(e){return e===D||e===F}const pe=function(e,t,r){var n=s(P(B),2),i=n[0],o=n[1],a=function(){var e=h.useRef(null);function t(){ce.cancel(e.current)}return h.useEffect((function(){return function(){t()}}),[]),[function r(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var o=ce((function(){i<=1?n({isCanceled:function(){return o!==e.current}}):r(n,i-1)}));e.current=o},t]}(),u=s(a,2),l=u[0],c=u[1];var f=t?de:fe;return ne((function(){if(i!==B&&i!==F){var e=f.indexOf(i),t=f[e+1],n=r(i);false===n?o(t,!0):t&&l((function(e){function r(){e.isCanceled()||o(t,!0)}!0===n?r():Promise.resolve(n).then(r)}))}}),[e,i]),h.useEffect((function(){return function(){c()}}),[]),[function(){o(L,!0)},i]};function me(e,t,r,i){var a=i.motionEnter,u=void 0===a||a,l=i.motionAppear,c=void 0===l||l,f=i.motionLeave,d=void 0===f||f,p=i.motionDeadline,m=i.motionLeaveImmediately,g=i.onAppearPrepare,v=i.onEnterPrepare,y=i.onLeavePrepare,b=i.onAppearStart,w=i.onEnterStart,_=i.onLeaveStart,E=i.onAppearActive,k=i.onEnterActive,C=i.onLeaveActive,M=i.onAppearEnd,x=i.onEnterEnd,A=i.onLeaveEnd,S=i.onVisibleChanged,O=s(P(),2),B=O[0],F=O[1],z=s(P(N),2),q=z[0],V=z[1],H=s(P(null),2),G=H[0],Z=H[1],W=(0,h.useRef)(!1),K=(0,h.useRef)(null);function $(){return r()}var Q=(0,h.useRef)(!1);function Y(){V(N,!0),Z(null,!0)}function J(e){var t=$();if(!e||e.deadline||e.target===t){var r,n=Q.current;q===T&&n?r=null==M?void 0:M(t,e):q===I&&n?r=null==x?void 0:x(t,e):q===R&&n&&(r=null==A?void 0:A(t,e)),q!==N&&n&&!1!==r&&Y()}}var X=function(e){var t=(0,h.useRef)(),r=(0,h.useRef)(e);r.current=e;var n=h.useCallback((function(e){r.current(e)}),[]);function i(e){e&&(e.removeEventListener(te,n),e.removeEventListener(ee,n))}return h.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(te,n),e.addEventListener(ee,n),t.current=e)},i]}(J),re=s(X,1)[0],ie=function(e){var t,r,i;switch(e){case T:return n(t={},L,g),n(t,j,b),n(t,D,E),t;case I:return n(r={},L,v),n(r,j,w),n(r,D,k),r;case R:return n(i={},L,y),n(i,j,_),n(i,D,C),i;default:return{}}},oe=h.useMemo((function(){return ie(q)}),[q]),ae=s(pe(q,!e,(function(e){if(e===L){var t=oe.prepare;return!!t&&t($())}var r;ue in oe&&Z((null===(r=oe[ue])||void 0===r?void 0:r.call(oe,$(),null))||null);return ue===D&&(re($()),p>0&&(clearTimeout(K.current),K.current=setTimeout((function(){J({deadline:!0})}),p))),ue===U&&Y(),true})),2),se=ae[0],ue=ae[1],le=he(ue);Q.current=le,ne((function(){F(t);var r,n=W.current;W.current=!0,!n&&t&&c&&(r=T),n&&t&&u&&(r=I),(n&&!t&&d||!n&&m&&!t&&d)&&(r=R);var i=ie(r);r&&(e||i.prepare)?(V(r),se()):V(N)}),[t]),(0,h.useEffect)((function(){(q===T&&!c||q===I&&!u||q===R&&!d)&&V(N)}),[c,u,d]),(0,h.useEffect)((function(){return function(){W.current=!1,clearTimeout(K.current)}}),[]);var ce=h.useRef(!1);(0,h.useEffect)((function(){B&&(ce.current=!0),void 0!==B&&q===N&&((ce.current||B)&&(null==S||S(B)),ce.current=!0)}),[B,q]);var fe=G;return oe.prepare&&ue===j&&(fe=o({transition:"none"},fe)),[q,ue,fe,null!=B?B:t]}const ge=function(e){var t=e;"object"===u(e)&&(t=e.transitionSupport);var r=h.forwardRef((function(e,r){var i=e.visible,a=void 0===i||i,u=e.removeOnLeave,l=void 0===u||u,p=e.forceRender,m=e.children,v=e.motionName,y=e.leavedClassName,b=e.eventProps,w=function(e,r){return!(!e.motionName||!t||!1===r)}(e,h.useContext(g).motion),_=(0,h.useRef)(),E=(0,h.useRef)();var k=s(me(w,a,(function(){try{return _.current instanceof HTMLElement?_.current:(0,f.Z)(E.current)}catch(e){return null}}),e),4),C=k[0],M=k[1],x=k[2],S=k[3],O=h.useRef(S);S&&(O.current=!0);var P,T=h.useCallback((function(e){_.current=e,(0,d.mH)(r,e)}),[r]),I=o(o({},b),{},{visible:a});if(m)if(C===N)P=S?m(o({},I),T):!l&&O.current&&y?m(o(o({},I),{},{className:y}),T):p||!l&&!y?m(o(o({},I),{},{style:{display:"none"}}),T):null;else{var R,B;M===L?B="prepare":he(M)?B="active":M===j&&(B="start");var D=re(v,"".concat(C,"-").concat(B));P=m(o(o({},I),{},{className:c()(re(v,C),(R={},n(R,D,D&&B),n(R,v,"string"==typeof v),R)),style:x}),T)}else P=null;h.isValidElement(P)&&(0,d.Yr)(P)&&(P.ref||(P=h.cloneElement(P,{ref:T})));return h.createElement(A,{ref:E},P)}));return r.displayName="CSSMotion",r}(X);function ve(){return ve=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Ee)}function Ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],n=0,i=t.length,a=ke(e),s=ke(t);a.forEach((function(e){for(var t=!1,a=n;a1}));return l.forEach((function(e){(r=r.filter((function(t){var r=t.key,n=t.status;return r!==e||n!==we}))).forEach((function(t){t.key===e&&(t.status=be)}))})),r}var Me=["component","children","onVisibleChanged","onAllRemoved"],xe=["status"],Ae=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const Se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ge,r=function(e){E(i,e);var r=x(i);function i(){var e;y(this,i);for(var t=arguments.length,a=new Array(t),s=0;s{"use strict";r.r(t),r.d(t,{_rs:()=>k,default:()=>L});var n=r(83963),i=r(67294),o=r(59864);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return i.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?r=r.concat(a(e)):(0,o.isFragment)(e)&&e.props?r=r.concat(a(e.props.children,t)):r.push(e))})),r}var s={},u=[];function l(e,t){}function c(e,t){}function f(e,t,r){t||s[r]||(e(!1,r),s[r]=!0)}function d(e,t){f(l,e,t)}d.preMessage=function(e){u.push(e)},d.resetWarned=function(){s={}},d.noteOnce=function(e,t){f(c,e,t)};var h=r(38442);function p(e){var t=function(e,t){if("object"!==(0,h.Z)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==(0,h.Z)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,h.Z)(t)?t:String(t)}function m(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(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 v(e){for(var t=1;t{"use strict";r.d(t,{Z:()=>o});var n=r(67294),i=r(73935);function o(e){return function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e)?e:e instanceof n.Component?i.findDOMNode(e):null}},41531:(e,t,r)=>{"use strict";r.d(t,{sQ:()=>a,mH:()=>o,Yr:()=>s});var n=r(38442),i=r(59864);r(67294);function o(e,t){"function"==typeof e?e(t):"object"===(0,n.Z)(e)&&e&&"current"in e&&(e.current=t)}function a(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return i.default.Children.forEach(t,(function(t){(null!=t||r.keepEmpty)&&(Array.isArray(t)?n=n.concat(e(t)):(0,o.isFragment)(t)&&t.props?n=n.concat(e(t.props.children,r)):n.push(t))})),n};var i=n(r(67294)),o=r(59864)},9440:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},58523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);var r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}},45489:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.clearContainerCache=function(){u.clear()},t.injectCSS=h,t.removeCSS=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=p(e,t);if(r){var n=c(t);n.removeChild(r)}},t.updateCSS=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=c(r);m(n,r);var i=p(t,r);if(i){var o,a,s;if(null!==(o=r.csp)&&void 0!==o&&o.nonce&&i.nonce!==(null===(a=r.csp)||void 0===a?void 0:a.nonce))i.nonce=null===(s=r.csp)||void 0===s?void 0:s.nonce;return i.innerHTML!==e&&(i.innerHTML=e),i}var u=h(e,r);return u.setAttribute(l(r),t),u};var i=n(r(9440)),o=n(r(58523)),a="data-rc-order",s="rc-util-key",u=new Map;function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):s}function c(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function f(e){return"queue"===e?"prependQueue":e?"prepend":"append"}function d(e){return Array.from((u.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,i.default)())return null;var r=t.csp,n=t.prepend,o=document.createElement("style");o.setAttribute(a,f(n)),null!=r&&r.nonce&&(o.nonce=null==r?void 0:r.nonce),o.innerHTML=e;var s=c(t),u=s.firstChild;if(n){if("queue"===n){var l=d(s).filter((function(e){return["prepend","prependQueue"].includes(e.getAttribute(a))}));if(l.length)return s.insertBefore(o,l[l.length-1].nextSibling),o}s.insertBefore(o,u)}else s.appendChild(o);return o}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=c(t);return d(r).find((function(r){return r.getAttribute(l(t))===e}))}function m(e,t){var r=u.get(e);if(!r||!(0,o.default)(document,r)){var n=h("",t),i=n.parentNode;u.set(e,i),e.removeChild(n)}}},55379:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.isStyleSupport=function(e,t){if(!Array.isArray(e)&&void 0!==t)return function(e,t){if(!o(e))return!1;var r=document.createElement("div"),n=r.style[e];return r.style[e]=t,r.style[e]!==n}(e,t);return o(e)};var i=n(r(9440)),o=function(e){if((0,i.default)()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],r=window.document.documentElement;return t.some((function(e){return e in r.style}))}return!1}},6453:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t._r=function(e,t){0},t._u=function(e){0},t.render=function(e,t){if(o)return void function(e,t){m(!0);var r=t[g]||o(t);m(!1),r.render(e),t[g]=r}(e,t);!function(e,t){h(e,t)}(e,t)},t.unmount=function(e){return w.apply(this,arguments)};var o,a=i(r(86336)),s=i(r(76063)),u=i(r(40665)),l=i(r(48977)),c=n(r(73935)),f=(0,l.default)({},c),d=f.version,h=f.render,p=f.unmountComponentAtNode;try{Number((d||"").split(".")[0])>=18&&(o=f.createRoot)}catch(e){}function m(e){var t=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,u.default)(t)&&(t.usingClientEntryPoint=e)}var g="__rc_react_root__";function v(e){return y.apply(this,arguments)}function y(){return(y=(0,s.default)((0,a.default)().mark((function e(t){return(0,a.default)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[g])||void 0===e||e.unmount(),delete t[g]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){p(e)}function w(){return(w=(0,s.default)((0,a.default)().mark((function e(t){return(0,a.default)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===o){e.next=2;break}return e.abrupt("return",v(t));case 2:b(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},90703:(e,t,r)=>{"use strict";var n=r(49932).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=i.useRef();t.current=e;var r=i.useCallback((function(){for(var e,r=arguments.length,n=new Array(r),i=0;i{"use strict";var n=r(85269).default,i=r(49932).default;Object.defineProperty(t,"__esModule",{value:!0}),t.useLayoutUpdateEffect=t.default=void 0;var o=i(r(67294)),a=(0,n(r(9440)).default)()?o.useLayoutEffect:o.useEffect,s=function(e,t){var r=o.useRef(!0);a((function(){return e(r.current)}),t),a((function(){return r.current=!1,function(){r.current=!0}}),[])};t.useLayoutUpdateEffect=function(e,t){s((function(t){if(!t)return e()}),t)};var u=s;t.default=u},92948:(e,t,r)=>{"use strict";var n=r(49932).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n=i.useRef({});"value"in n.current&&!r(n.current.condition,t)||(n.current.value=e(),n.current.condition=t);return n.current.value};var i=n(r(67294))},52904:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=t||{},n=r.defaultValue,l=r.value,c=r.onChange,f=r.postState,d=(0,s.default)((function(){return u(l)?l:u(n)?"function"==typeof n?n():n:"function"==typeof e?e():e})),h=(0,i.default)(d,2),p=h[0],m=h[1],g=void 0!==l?l:p,v=f?f(g):g,y=(0,o.default)(c),b=(0,s.default)([g]),w=(0,i.default)(b,2),_=w[0],E=w[1];(0,a.useLayoutUpdateEffect)((function(){var e=_[0];p!==e&&y(p,e)}),[_]),(0,a.useLayoutUpdateEffect)((function(){u(l)||m(l)}),[l]);var k=(0,o.default)((function(e,t){m(e,t),E([g],t)}));return[v,k]};var i=n(r(67900)),o=n(r(90703)),a=r(91869),s=n(r(68175));function u(e){return void 0!==e}},68175:(e,t,r)=>{"use strict";var n=r(49932).default,i=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=a.useRef(!1),r=a.useState(e),n=(0,o.default)(r,2),i=n[0],s=n[1];return a.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[i,function(e,r){if(r&&t.current)return;s(e)}]};var o=i(r(67900)),a=n(r(67294))},54406:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=(0,i.default)({},e);Array.isArray(t)&&t.forEach((function(e){delete r[e]}));return r};var i=n(r(48977))},15188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return+setTimeout(e,16)},n=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(r=function(e){return window.requestAnimationFrame(e)},n=function(e){return window.cancelAnimationFrame(e)});var i=0,o=new Map;function a(e){o.delete(e)}var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=i+=1;function s(t){if(0===t)a(n),e();else{var i=r((function(){s(t-1)}));o.set(n,i)}}return s(t),n};s.cancel=function(e){var t=o.get(e);return a(t),n(t)};var u=s;t.default=u},55608:(e,t,r)=>{"use strict";var n=r(85269).default;Object.defineProperty(t,"__esModule",{value:!0}),t.composeRef=u,t.fillRef=s,t.supportRef=function(e){var t,r,n=(0,o.isMemo)(e)?e.type.type:e.type;if("function"==typeof n&&(null===(t=n.prototype)||void 0===t||!t.render))return!1;if("function"==typeof e&&(null===(r=e.prototype)||void 0===r||!r.render))return!1;return!0},t.useComposeRef=function(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.call=u,t.default=void 0,t.note=a,t.noteOnce=c,t.preMessage=void 0,t.resetWarned=s,t.warning=o,t.warningOnce=l;var r={},n=[],i=function(e){n.push(e)};function o(e,t){}function a(e,t){}function s(){r={}}function u(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function l(e,t){u(o,e,t)}function c(e,t){u(a,e,t)}t.preMessage=i,l.preMessage=i,l.resetWarned=s,l.noteOnce=c;var f=l;t.default=f},39809:(e,t,r)=>{"use strict";const n=t;n.bignum=r(13550),n.define=r(22500).define,n.base=r(71979),n.constants=r(36826),n.decoders=r(78307),n.encoders=r(56579)},22500:(e,t,r)=>{"use strict";const n=r(56579),i=r(78307),o=r(35717);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)}},36625:(e,t,r)=>{"use strict";const n=r(35717),i=r(98465).b,o=r(2399).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}},71979:(e,t,r)=>{"use strict";const n=t;n.Reporter=r(98465).b,n.DecoderBuffer=r(36625).C,n.EncoderBuffer=r(36625).R,n.Node=r(41949)},41949:(e,t,r)=>{"use strict";const n=r(98465).b,i=r(36625).R,o=r(36625).C,a=r(79746),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"],u=["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 c=["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={};c.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;u.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(e){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(t){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)}},98465:(e,t,r)=>{"use strict";const n=r(35717);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(e){this.stack=e.stack}return this}},70160:(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)},36826:(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(70160)},41671:(e,t,r)=>{"use strict";const n=r(35717),i=r(13550),o=r(36625).C,a=r(41949),s=r(70160);function u(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 c(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 f(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 t=0;t{"use strict";const n=t;n.der=r(41671),n.pem=r(59631)},59631:(e,t,r)=>{"use strict";const n=r(35717),i=r(2399).Buffer,o=r(41671);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,u=-1;for(let e=0;e{"use strict";const n=r(35717),i=r(2399).Buffer,o=r(41949),a=r(70160);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(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(u,o),u.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 e=n.length;e>=256;e>>=8)s++;const u=i.alloc(2+s);u[0]=o,u[1]=128|s;for(let e=1+s,t=n.length;t>0;e--,t>>=8)u[e]=255&t;return this._createEncoderBuffer([u,n])},u.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 t=0;t=128;r>>=7)n++}const o=i.alloc(n);let a=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[a--]=127&r;(r>>=7)>0;)o[a--]=128|127&r}return this._createEncoderBuffer(o)},u.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")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.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 t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.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(66984),n.pem=r(2883)},2883:(e,t,r)=>{"use strict";const n=r(35717),i=r(66984);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 e=0;e{e.exports=r(51609)},55448:(e,t,r)=>{"use strict";var n=r(64867),i=r(71309),o=r(4372),a=r(15327),s=r(94097),u=r(84109),l=r(67985),c=r(85061);e.exports=function(e){return new Promise((function(t,r){var f=e.data,d=e.headers,h=e.responseType;n.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+g)}var v=s(e.baseURL,e.url);function y(){if(p){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,o={data:h&&"text"!==h&&"json"!==h?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};i(t,r,o),p=null}}if(p.open(e.method.toUpperCase(),a(v,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(y)},p.onabort=function(){p&&(r(c("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(c("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(c(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||l(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}"setRequestHeader"in p&&n.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),h&&"json"!==h&&(p.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),f||(f=null),p.send(f)}))}},51609:(e,t,r)=>{"use strict";var n=r(64867),i=r(91849),o=r(30321),a=r(47185);function s(e){var t=new o(e),r=i(o.prototype.request,t);return n.extend(r,o.prototype,t),n.extend(r,t),r}var u=s(r(45655));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=r(65263),u.CancelToken=r(14972),u.isCancel=r(26502),u.all=function(e){return Promise.all(e)},u.spread=r(8713),u.isAxiosError=r(16268),e.exports=u,e.exports.default=u},65263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},14972:(e,t,r)=>{"use strict";var n=r(65263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},26502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},30321:(e,t,r)=>{"use strict";var n=r(64867),i=r(15327),o=r(80782),a=r(13572),s=r(47185),u=r(54875),l=u.validators;function c(e){this.defaults=e,this.interceptors={request:new o,response:new o}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:l.transitional(l.boolean,"1.0.0"),forcedJSONParsing:l.transitional(l.boolean,"1.0.0"),clarifyTimeoutError:l.transitional(l.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!n){var c=[a,void 0];for(Array.prototype.unshift.apply(c,r),c=c.concat(o),i=Promise.resolve(e);c.length;)i=i.then(c.shift(),c.shift());return i}for(var f=e;r.length;){var d=r.shift(),h=r.shift();try{f=d(f)}catch(e){h(e);break}}try{i=a(f)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},c.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=c},80782:(e,t,r)=>{"use strict";var n=r(64867);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},94097:(e,t,r)=>{"use strict";var n=r(91793),i=r(7303);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},85061:(e,t,r)=>{"use strict";var n=r(80481);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},13572:(e,t,r)=>{"use strict";var n=r(64867),i=r(18527),o=r(26502),a=r(45655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},80481:e=>{"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},47185:(e,t,r)=>{"use strict";var n=r(64867);e.exports=function(e,t){t=t||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function l(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=u(void 0,e[i])):r[i]=u(e[i],t[i])}n.forEach(i,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(o,l),n.forEach(a,(function(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=u(void 0,e[i])):r[i]=u(void 0,t[i])})),n.forEach(s,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var c=i.concat(o).concat(a).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return n.forEach(f,l),r}},71309:(e,t,r)=>{"use strict";var n=r(85061);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},18527:(e,t,r)=>{"use strict";var n=r(64867),i=r(45655);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},45655:(e,t,r)=>{"use strict";var n=r(64867),i=r(16016),o=r(80481),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(55448)),u),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){l.headers[e]=n.merge(a)})),e.exports=l},91849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(64867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var n=r(64867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},16268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},67985:(e,t,r)=>{"use strict";var n=r(64867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16016:(e,t,r)=>{"use strict";var n=r(64867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},84109:(e,t,r)=>{"use strict";var n=r(64867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},54875:(e,t,r)=>{"use strict";var n=r(88593),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={},a=n.version.split(".");function s(e,t){for(var r=t?t.split("."):a,n=e.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},64867:(e,t,r)=>{"use strict";var n=r(91849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r{"use strict";r.d(t,{LR:()=>o,vA:()=>a,DM:()=>s,RZ:()=>u,Qp:()=>l,VK:()=>c,tZ:()=>f,hF:()=>d,Ie:()=>h,V2:()=>p,fy:()=>m});var n=r(2804),i=r(59314);(0,n.cn)({key:"connectorState",default:{chainId:null,networkError:null}});const o=(0,n.cn)({key:"walletModalOpenState",default:!1}),a=(0,n.cn)({key:"profileHistoryListState",default:[]}),s=((0,n.cn)({key:"ChainSelector",default:!1}),(0,n.cn)({key:"refreshBalance",default:"0"})),u=(0,n.cn)({key:"pointsDialog",default:!1,effects_UNSTABLE:[(0,i.Nh)("pointsDialog")]}),l=(0,n.cn)({key:"pointsWarn",default:0}),c=(0,n.cn)({key:"hidePointsWarn",default:!1,effects_UNSTABLE:[(0,i.Nh)("hidePointsWarn")]}),f=(0,n.cn)({key:"pointsRuleDialog",default:!1}),d=(0,n.cn)({key:"accountInfoDialog",default:!1,effects_UNSTABLE:[(0,i.Nh)("accountInfoDialog")]}),h=(0,n.cn)({key:"linkToBetaDialog",default:!1}),p=(0,n.cn)({key:"nativeBalance",default:0,effects_UNSTABLE:[(0,i.Nh)("nativeBalance")]}),m=(0,n.cn)({key:"pointsBalance",default:0,effects_UNSTABLE:[(0,i.Nh)("pointsBalance")]})},66847:(e,t,r)=>{"use strict";r.d(t,{K:()=>y,Z:()=>b});r(82815);var n=r(84960),i=r(94184),o=r.n(i),a=r(67294),s=r(29163),u=r(60215),l=r(88017),c=r(5024);const f="index_playerAvatar__Anx6C",d="index_avatar__RnAt2",h="index_avatar_account__uM1CT";var p;const m=s.ZP.div(p||(g=["\n background: ",";\n border-radius: 50%;\n position: relative;\n ","\n\n padding: 1.875px;\n ","\n\n .center-circle {\n background: ",";\n border-radius: 50%;\n padding: ",";\n width: 100%;\n height: 100%;\n .inner-circle {\n background: #613c17;\n box-shadow: ",";\n width: 100%;\n height: 100%;\n border-radius: 50%;\n img {\n border-radius: 50%;\n box-shadow: ",";\n }\n }\n }\n"],v||(v=g.slice(0)),p=Object.freeze(Object.defineProperties(g,{raw:{value:Object.freeze(v)}}))),(e=>{let{isGrey:t,isGreen:r}=e;return r?"linear-gradient(180deg, #8FCA3A 0%, #59B11C 32.81%, #259900 100%)":t?"linear-gradient(180deg, #ddd 0%, #434343 100%)":"linear-gradient(180deg, #F1A541 0%, #D48A2B 45.31%, #9F5A03 100%)"}),(e=>{let{winner:t}=e;return t&&"&::after {\n content: '';\n position: absolute;\n top: -14px;\n right: -5px;\n width: 27px;\n height: 25px;\n background: url(".concat(c,") no-repeat;\n }")}),(e=>{let{size:t}=e;return"small"===t?" width: 40px;\n height: 40px;":"large"===t?" width: 64px;\n height: 64px;\n padding: 3px;":t?" width: ".concat(t,"px;\n height: ").concat(t,"px;"):"\n width: 48px;\n height: 48px;\n "}),(e=>{let{isGrey:t,isGreen:r}=e;return r?"linear-gradient(180deg, #289B02 0%, #65B724 29.17%, #8CC939 100%)":t?"linear-gradient(180deg, #494949 0%, #d9d9d9 100%)":"linear-gradient(180deg, #AE6306 0%, #D68B2B 29.69%, #E79B3B 100%)"}),(e=>{let{size:t}=e;return"large"==t?"2px":"1.25px"}),(e=>{let{size:t}=e;return"large"==t?"0px 2px 0px 0px rgba(0, 0, 0, 0.25) inset":"0px 1.25px 0px 0px rgba(0, 0, 0, 0.25) inset"}),(e=>{let{size:t}=e;return"large"==t?"0px 2px 0px 0px rgba(0, 0, 0, 0.25) inset":"0px 1.25px 0px 0px rgba(0, 0, 0, 0.25) inset"}));var g,v;const y=e=>{let{account:t,size:r,isGreen:n=!1,isGrey:i=!1,winner:o}=e;const{selectedAvatar:s,selectedBackground:l}=(0,u.Z)(t);return a.createElement(m,{size:r,isGreen:n,isGrey:i,winner:o},a.createElement("div",{className:"center-circle "},a.createElement("div",{className:"inner-circle"},t?a.createElement("img",{width:"100%",src:s,style:{background:l}}):a.createElement("img",{width:"100%",src:"/img/default_avatar.png"}))))},b=e=>{let{account:t,showAccount:r=!1,size:i=60,border:s=!1,AvatarBorder:c=a.Fragment,className:p,preLen:m,endLen:g,otherStr:v}=e;const{selectedAvatar:y,selectedBackground:b}=(0,u.Z)(t);return a.createElement("div",{className:o()(p,f)},t?a.createElement(c,null,a.createElement(n.ZP,{size:i,src:y,style:s?{background:b,border:"2px solid #62380C"}:{background:b}})):a.createElement("div",{className:d,style:{width:"".concat(i,"px"),height:"".concat(i,"px"),overflow:"hidden",background:"rgba(138, 138, 138, 1)"}},a.createElement(n.ZP,{size:i,src:"/img/default_avatar.png"})),r&&a.createElement("p",{className:null!=p&&p.includes("account")?h:""},t?"".concat((0,l.LM)(t,m,g)).concat(v?" ".concat(v):""):"waiting"))}},5975:(e,t,r)=>{"use strict";r.d(t,{uN:()=>b,xi:()=>w});var n=r(9279),i=r(5151),o=r(56371),a=r(54258),s=r(27859),u=r(91024),l=r(54423),c=r(44859),f=r(59770);function d(e){const t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function h(e,t){let r=!1;Array.isArray(e[0])?r=!0:1===e.length?r=t.inputs.some((e=>e.indexed)):2===e.length&&(r=!0);return{args:r?e[0]:void 0,options:(r?e[1]:e[0])??{}}}var p=r(47631),m=r(22669);function g(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 v(e){for(var t=1;t{let{abi:t,address:r,chainId:n,publicClient:i,signer:o}=e;const g=function({abi:e,address:t,publicClient:r,walletClient:n}){const i=null!=r,o=null!=n,p={};let m=!1,g=!1,v=!1;for(const t of e)if("function"===t.type?"view"===t.stateMutability||"pure"===t.stateMutability?m=!0:g=!0:"event"===t.type&&(v=!0),m&&g&&v)break;return i&&(m&&(p.read=new Proxy({},{get:(n,i)=>(...n)=>{const{args:o,options:a}=d(n);return(0,u.L)(r,{abi:e,address:t,functionName:i,args:o,...a})}})),g&&(p.simulate=new Proxy({},{get:(n,i)=>(...n)=>{const{args:o,options:a}=d(n);return(0,l.a)(r,{abi:e,address:t,functionName:i,args:o,...a})}})),v&&(p.createEventFilter=new Proxy({},{get:(n,i)=>(...n)=>{const o=e.find((e=>"event"===e.type&&e.name===i)),{args:s,options:u}=h(n,o);return(0,a.A)(r,{abi:e,address:t,eventName:i,args:s,...u})}}),p.watchEvent=new Proxy({},{get:(n,i)=>(...n)=>{const o=e.find((e=>"event"===e.type&&e.name===i)),{args:a,options:s}=h(n,o);return(0,c.Y)(r,{abi:e,address:t,eventName:i,args:a,...s})}}))),o&&g&&(p.write=new Proxy({},{get:(r,i)=>(...r)=>{const{args:o,options:a}=d(r);return(0,f.n)(n,{abi:e,address:t,functionName:i,args:o,...a})}})),(i||o)&&g&&(p.estimateGas=new Proxy({},{get:(i,o)=>(...i)=>{const{args:a,options:u}=d(i),l=r??n;return(0,s.D)(l,{abi:e,address:t,functionName:o,args:a,...u,account:u.account??n.account})}})),p.address=t,p.abi=e,p}({abi:t,address:r,publicClient:null!=i?i:(0,m.NP)({chainId:null!=n?n:p.x5}),walletClient:o});return v(v({},g),{},{account:null==o?void 0:o.account,chain:null==o?void 0:o.chain})};const w=async e=>{let{address:t,abi:r,library:a,account:s}=e;if(!function(e){try{return(0,o.getAddress)(e)}catch(e){return!1}}(t)||t===n.d)throw Error("Invalid 'address' parameter '".concat(t,"'."));return new i.Contract(t,r,function(e,t){return t?function(e,t){return e.getSigner(t).connectUnchecked()}(e,t):e}(a,s))}},10271:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});const n=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]');var i=r(5975);r(63829);const o=(e,t,r)=>{if(!t)throw new Error("No addrerss");return(0,i.uN)({abi:n,address:t,signer:r,chainId:e})}},12322:(e,t,r)=>{"use strict";r.d(t,{g:()=>o});var n=r(36286),i=r(47631);const o=()=>{var e;const{chain:t}=(0,n.LN)(),r=null!==(e=null==t?void 0:t.id)&&void 0!==e?e:void 0;return{chainId:r,isWrongNetwork:!Object.values(i.KC).includes(Number(r))}}},59619:(e,t,r)=>{"use strict";r.d(t,{a:()=>s});var n=r(96751),i=r(67294),o=r(36286),a=r(47631);function s(){const e=(0,n.xx)(),{address:t}=(0,o.mA)(),r=(0,o.t_)();return(0,i.useMemo)((()=>({showV1ul:!0,chainId:e===a.a_.Arbitrum?void 0:e,account:e===a.a_.Arbitrum?void 0:t,provider:r})),[e,t,r])}},63829:(e,t,r)=>{"use strict";r(67294),r(5975),r(12322)},6018:(e,t,r)=>{"use strict";r.d(t,{n:()=>c});var n=r(67294),i=r(63702),o=r(22669),a=r(12322);function s(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 u(e){for(var t=1;t{if(e)return o.rk[e]?o.rk[e].waitForTransactionReceipt(t):(0,i.Mn)(u(u({},t),{},{chainId:e}))}),[e])}}},9120:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,d:()=>a});var n=r(67294),i=r(10071);function o(){const[e,t]=(0,n.useState)({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}),r=(0,n.useCallback)((()=>{t({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}),[]);return(0,n.useEffect)((()=>(window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)})),[]),e}const a=()=>{const e=(0,n.useContext)(i.E);return void 0!==e&&e}},59314:(e,t,r)=>{"use strict";r.d(t,{Nh:()=>i,qH:()=>o,TK:()=>a,sg:()=>s,pv:()=>u});var n=r(2804);const i=e=>t=>{let{setSelf:r,onSet:i}=t;const o=localStorage.getItem(e);if(null!=o)try{r(JSON.parse(o))}catch(e){console.log(e)}i((t=>{t instanceof n.nY||!t?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}))},o=(0,n.cn)({key:"joinGameState",default:{signedLabel:"",signedCard:"",lineupUsers:[]},effects_UNSTABLE:[i("joinGameState")]}),a=(0,n.cn)({key:"gameRoomState",default:{cardContract:"",gameId:-1,cardNumbers:[]},effects_UNSTABLE:[i("gameRoomState")]}),s=(0,n.cn)({key:"startGameStep",default:0}),u=(0,n.cn)({key:"soundOn",default:0,effects_UNSTABLE:[i("soundOn")]})},49786:(e,t,r)=>{"use strict";let n,i;r.d(t,{_:()=>n,W:()=>i}),function(e){e.Live="live",e.End="end",e.Overtime="overtime",e.Invalid="invalid"}(n||(n={})),function(e){e.zBingo="zBingo"}(i||(i={}))},61511:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m,C:()=>g});var n,i,o=r(18446),a=r.n(o),s=r(67294),u=r(29163),l=r(66847),c=r(53127);function f(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const d=u.ZP.p(n||(n=f(["\n display: flex;\n align-items: center;\n img {\n display: inline-block;\n width: ",";\n margin-left: ",";\n }\n"])),(e=>{let{isMobile:t}=e;return t?"20px":"30px"}),(e=>{let{isMobile:t}=e;return t?"4px":"10px"})),h=(0,s.memo)((e=>{let{label:t,showPoint:r,isMobile:n}=e;return"".concat(t).startsWith("0x")?s.createElement(l.Z,{className:c.Z.account,size:22,account:t,showAccount:!0,border:!1}):s.createElement(d,{isMobile:n},t,r?s.createElement(m,{isMobile:n}):null)}),a()),p=u.ZP.img(i||(i=f(["\n display: inline-block;\n width: ",";\n margin-left: ",";\n"])),(e=>{let{isMobile:t}=e;return t?"20px":"30px"}),(e=>{let{isMobile:t}=e;return t?"4px":"10px"})),m=(0,s.memo)((e=>{let{isMobile:t,classname:r}=e;return s.createElement(p,{isMobile:t,src:"/img/home/data_points.svg",alt:"",className:r})}),a()),g=h},23697:(e,t,r)=>{"use strict";r.d(t,{t:()=>f,Z:()=>h});var n,i,o=r(18446),a=r.n(o),s=r(67294),u=r(29163),l=r(49786);function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const f=u.ZP.i(n||(n=c(["\n box-sizing: content-box;\n display: inline-block;\n width: ",";\n height: ",";\n background-color: #65edbc;\n margin-left: ",";\n border-radius: 50%;\n position: relative;\n &:before {\n content: '';\n width: 100%;\n height: 100%;\n position: absolute;\n top: ",";\n left: ",";\n border: "," solid rgba(101, 237, 188, 0.19);\n box-sizing: content-box;\n border-radius: 50%;\n }\n"])),(e=>{let{isMobile:t}=e;return t?"5px":"6px"}),(e=>{let{isMobile:t}=e;return t?"5px":"6px"}),(e=>{let{isMobile:t}=e;return t?"4px":"10px"}),(e=>{let{isMobile:t}=e;return t?"-2px":"-3px"}),(e=>{let{isMobile:t}=e;return t?"-2px":"-3px"}),(e=>{let{isMobile:t}=e;return t?"2px":"3px"})),d=u.ZP.em(i||(i=c(["\n text-transform: capitalize;\n font-family: Poppins;\n font-weight: 600;\n"]))),h=(0,s.memo)((e=>{let{status:t,isMobile:r}=e;return s.createElement("p",null,s.createElement(d,null,t," "),t===l._.Live?s.createElement(f,{isMobile:r}):null)}),a())},20825:(e,t,r)=>{"use strict";r.d(t,{cW:()=>C,Z8:()=>A,b0:()=>S,yi:()=>T});var n=r(96751),i=r(44431),o=r.n(i),a=r(46474),s=r(67294),u=r(2804),l=r(36286),c=r(21449);const f=JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"enum IBingoPoints.ClaimType","name":"claimType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"nativeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pointsAmount","type":"uint256"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawTo","type":"event"},{"inputs":[],"name":"CONSECUTIVE_TIMES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"address","name":"","type":"address"}],"name":"dayClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freeClaimEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gameToken_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lobby_","type":"address"},{"internalType":"uint256","name":"infoIndex_","type":"uint256"}],"name":"nativeSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"nativeWithdrawTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IBingoPoints.ClaimType","name":"claimType","type":"uint8"},{"internalType":"uint256[]","name":"claimConf_","type":"uint256[]"}],"name":"setClaimConf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"freeClaimEnable_","type":"bool"}],"name":"setFreeClaimEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"gameToken_","type":"address"}],"name":"setGameToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"signInClaimEnable_","type":"bool"}],"name":"setSignInClaimEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lastLength","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"discount","type":"uint256"}],"internalType":"struct ZkBingoPoints.SwapInfo[]","name":"swapInfos_","type":"tuple[]"}],"name":"setSwapInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"uint256","name":"ratio_","type":"uint256"}],"name":"setSwapRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signInClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signInClaimEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signInInfos","outputs":[{"internalType":"uint8","name":"signCount","type":"uint8"},{"internalType":"string","name":"lastSignIn","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swapInfos","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"discount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"swapRatios","outputs":[{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"ratio","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"swaps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"totalSwaps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]');var d=r(47631),h=r(5975),p=r(59619);r(63829);const m=(e,t,r)=>(0,h.uN)({abi:f,address:null!=t?t:(0,d.Cf)(e,d.iJ.Points),signer:r,chainId:e});var g=r(10271),v=r(6018),y=r(37917),b=r(33030),w=r(46286),_=r(88017),E=r(77599);d.a_.ArbitrumGoerli;var k;let C;!function(e){e[e.FREE=0]="FREE",e[e.SIGNIN=1]="SIGNIN"}(k||(k={})),function(e){e.ordinary="ordinary",e.princely="princely"}(C||(C={}));const M={[k.FREE]:{1:{ordinary:a.parseUnits("5000","ether"),princely:a.parseUnits("1000","ether")}},[k.SIGNIN]:{1:{ordinary:a.parseUnits("50","ether"),princely:a.parseUnits("60","ether")},2:{ordinary:a.parseUnits("50","ether"),princely:a.parseUnits("60","ether")},3:{ordinary:a.parseUnits("70","ether"),princely:a.parseUnits("90","ether")},4:{ordinary:a.parseUnits("70","ether"),princely:a.parseUnits("90","ether")},5:{ordinary:a.parseUnits("100","ether"),princely:a.parseUnits("150","ether")},6:{ordinary:a.parseUnits("100","ether"),princely:a.parseUnits("150","ether")},7:{ordinary:a.parseUnits("160","ether"),princely:a.parseUnits("200","ether")}}},x={[d.a_.LineaMainnet]:5e-7,[d.a_.LineaTestnet]:5e-7,[d.a_.OPBNB]:4e-6,[d.a_.OPBNBTEST]:4e-6},A=e=>{try{return[["10000"],["30000"],["50000"],["60000"],["80000"],["100000 ","2"],["300000","5"],["500000","10"]].map(((t,r)=>{const n=x[e],i=t[1]?new(o())(n).times(t[0]).times(.01*(100-Number(t[1]))).toFixed(8):new(o())(n).times(t[0]).toFixed(8),a=(0,_.lb)(Number(i),8),s=(0,_.lb)(Number(t[0]));return{index:r+1,pointAmount:t[0],pointAmountStr:s,price:i,priceStr:a,discount:t[1]}}))}catch(e){console.error("pointsListDefault: ",e)}},S=()=>{const[e,t]=(0,s.useState)(),[r,i]=(0,s.useState)(),[o]=(0,s.useState)(),[a,f]=(0,s.useState)("5000"),[h,g]=(0,s.useState)(!1),[_,k]=(0,u.FV)(c.DM),{postAccountUpdate:C}=(0,E.$A)(),M=(0,u.Zl)(c.LR),x=(0,y.T)(),{data:A}=(0,l.py)(),[S,T]=(0,s.useState)({});(e=>{const{chainId:t,account:r}=(0,p.a)(),n=(0,s.useCallback)((async()=>{try{const n=m(t);if(console.log({pointsContract:n,nativeChainId:t,account:r}),n&&t&&r){const t=(0,b.GI)(),i=(0,b.n4)(t),o=await n.read.dayClaimed([i,r]),a=n.read.claim;e({dayClaimed:o,claim:a})}else e({})}catch(e){}}),[r,t]);(0,s.useEffect)((()=>{n()}),[r,t])})(T),O({setClaimType:i,bingoLobbyContractStatic:S}),P({blindBoxAddress:null==S?void 0:S.blindBoxAddress,setBoxBalance:t}),N({boxBalance:e,claimType:r,setPointsStr:f,setClaimConfKey:void 0}),(0,s.useEffect)((()=>{var e;g(null!==(e=null==S?void 0:S.dayClaimed)&&void 0!==e&&e)}),[S]);const[I,R]=(0,s.useState)(!1),{chainId:B,account:L}=(0,p.a)(),{waitForTransaction:j}=(0,v.n)(),{openChainModal:D}=(0,n.iC)();return{pointsStr:a,dayClaimed:h,claimHandle:(0,s.useCallback)((async()=>{try{if(!L)return void M(!0);if(D&&(!d.KC.includes(B)||B===d.a_.Arbitrum))return void D();if(!A)return;const e=m(B,void 0,A);if(!e)return e||(0,w.d)(x,"PointsContract is not ready"),void M(!0);R(!0);const t=await e.write.freeClaim(),r="string"==typeof t?t:t.hash,n=await j({confirmations:1,hash:r});if(!n||n.status!==d.pQ)throw Object.assign(new Error("Claim Transaction Failed"),{name:"Claim"});C({tx:n}),k(_+1),(0,w.x)(x,{title:"",message:"Claim successful"}),g(!0)}catch(e){(0,w.d)(x,e),console.error("claimHandle: ",e)}finally{R(!1)}}),[D,L,B,_,A]),isClaimLoading:I,claimConfKey:o}},O=e=>{let{setClaimType:t,bingoLobbyContractStatic:r}=e;const n=(0,s.useCallback)((async()=>{try{if(null==r||!r.claimStartTime)return;const e=(0,b.GI)(),n=1209600;e<=(null==r?void 0:r.claimStartTime)+n?t(k.FREE):t(k.SIGNIN)}catch(e){console.error("",e)}}),[null==r?void 0:r.claimStartTime]);(0,s.useEffect)((()=>{n()}),[null==r?void 0:r.claimStartTime])},P=e=>{let{setBoxBalance:t,blindBoxAddress:r}=e;const{account:n,chainId:i}=(0,p.a)(),a=(0,s.useCallback)((async()=>{try{if(!r||!i)return;const e=(0,g.Z)(i,r),a=await(null==e?void 0:e.read.balanceOf([n])),s=new(o())(a).toString();t(s)}catch(e){console.error("useBoxBalance: ",e)}}),[r]);(0,s.useEffect)((()=>{n&&a()}),[r])},N=e=>{let{boxBalance:t,claimType:r,setPointsStr:n,setClaimConfKey:i}=e;const[o,u]=(0,s.useState)("5000");(0,s.useEffect)((()=>{var e;if(void 0===r||!t)return;const n="0"===t?C.ordinary:C.princely;i&&i(n);const o=null===(e=M[r])||void 0===e?void 0:e[1];o&&o[n]?u(a.formatEther(o[n]).toString()):u("-")}),[t,r,n]),(0,s.useEffect)((()=>{n((0,_.lb)(Number(o)))}),[o])},T=()=>{const{account:e,chainId:t}=(0,p.a)(),{postAccountUpdate:r}=(0,E.$A)(),[n,i]=(0,s.useState)(!1),o=(0,y.T)(),f=(0,u.Zl)(c.RZ),[h,g]=(0,u.FV)(c.DM),{waitForTransaction:b}=(0,v.n)(),_=(0,u.sJ)(c.VK),[k,C]=(0,u.FV)(c.Qp),[M,x]=(0,s.useState)(),{data:S}=(0,l.py)();return{isLoading:n,swapPointHandle:(0,s.useCallback)((async e=>{if((1===k||_)&&S){const n=M||0===M?M:e;if(n||0===n){C(2);try{const e=A(t);if(!e)throw Object.assign(new Error("Not pointsList"),{name:"NativeSwap"});{const s=e[n];i(!0);const u=m(t,void 0,S);if(!t||!u)return f(!1),void(u||(0,w.d)(o,"PointsContract is not ready"));const l=(0,d.Cf)(t,d.iJ.Lobby);console.log({lobbyContractAddress:l});const c=await u.write.nativeSwap([l,s.index],{value:a.parseEther(s.price)}),p="string"==typeof c?c:c.hash,v=await b({confirmations:1,hash:p});if(!v||v.status!==d.pQ)throw Object.assign(new Error("NativeSwap Transaction Failed"),{name:"NativeSwap"});r({tx:v}),g(h+1),(0,w.x)(o,{title:"",message:"Recharge successful"}),f(!1)}}catch(e){(0,w.d)(o,e),console.error("swapPointHandle: ",e)}finally{i(!1)}}else C(0)}else x(e),C(1)}),[e,M,_,k,t,h,S])}}},77599:(e,t,r)=>{"use strict";r.d(t,{$A:()=>R,CQ:()=>O,pK:()=>P,wo:()=>I});var n=r(18446),i=r.n(n),o=r(44431),a=r.n(o),s=r(76455),u=r(67294);function l(){var e=new Map;return{getObserver:function(t){var r=t.root,n=t.rootMargin,i=t.threshold,o=e.get(r);o||(o=new Map,e.set(r,o));var a=JSON.stringify({rootMargin:n,threshold:i}),s=o.get(a);if(!s){var u=new Map,l=new IntersectionObserver((function(e){e.forEach((function(e){var t=u.get(e.target);null==t||t(e)}))}),{root:r,rootMargin:n,threshold:i});s={observer:l,entryCallbacks:u},o.set(a,s)}return{observe:function(e,t){var r,n;null==(r=s)||r.entryCallbacks.set(e,t),null==(n=s)||n.observer.observe(e)},unobserve:function(e){var t,r;null==(t=s)||t.entryCallbacks.delete(e),null==(r=s)||r.observer.unobserve(e)}}}}}var c=[0],f=l();function d(){return d=Object.assign||function(e){for(var t=1;t{const{chainId:e,account:t}=(0,g.a)(),r=(0,m.sJ)(M.Xl),n=(0,m.Zl)(M.Xl),o=(0,u.useCallback)((async()=>{const e={user_addr:t},o=await(0,y.W)(k.accountInfo,{method:"POST",data:JSON.stringify(e),headers:{"Content-Type":"application/json"}});if(o.data&&200==o.data.code){const e=T(o.data.data);i()(r,e)||n(e),n(T(o.data.data))}else n(T(M.Db))}),[t,e]);(0,u.useEffect)((()=>{t&&e&&o()}),[t,e])},P=()=>{const e=(0,m.sJ)(M.ST),t=(0,m.Zl)(M.ST),[r,n]=(0,u.useState)(!1),[o,s]=(0,u.useState)(0),[l,c]=(0,u.useState)(!0),f=(0,v.C)((e=>e.user.selectedChainId)),{chainId:d=(null!=f?f:C)}=(0,g.a)(),h=(0,u.useCallback)((async()=>{if(r||!d)return;n(!0);const{data:u,totalPage:l}=await N(o,d);if(!i()(e,u)){u.sort(((e,t)=>{const r=new(a())(e.total);return new(a())(t.total).minus(r).toNumber()}));const e=u.map(((e,t)=>A(A({},e),{},{rank:"".concat(t+1)})));t(e)}n(!1),l<=o?c(!1):s(o+1)}),[e,d,o]),[y,{rootRef:b}]=p({loading:r,hasNextPage:l,onLoadMore:h});return(0,u.useEffect)((()=>{d&&h()}),[d]),{sentryRef:y,rootRef:b,loading:r,currentPage:o,hasMore:l}},N=async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20;const n=[],i={limit:"".concat(r),page:"".concat(e)},o=await(0,y.W)(k.accountListInfo,{method:"POST",data:JSON.stringify(i),headers:{"Content-Type":"application/json"}});if(o.data&&200==o.data.code&&o.data.data.result&&o.data.data.result.length>0){const e=o.data.data.result;for(let t=0;t{const e=(0,m.Zl)(M.qg);(0,u.useEffect)((()=>{const t=new URL(window.location.href),r=t.searchParams.get("share"),n=t.searchParams.get("chain_id");if(null!=r&&r.startsWith("0x")){s.isAddress(r)&&e({address:r,chainId:Number(n)})}}),[])},R=()=>{const{chainId:e,account:t}=(0,g.a)(),r=(0,m.sJ)(M.qg),n=(0,m.Zl)(M.qg);return{postAccountUpdate:(0,u.useCallback)((async i=>{let{tx:o}=i;try{if(o.status===w.pQ){const i={user_addr:t,chain_id:"".concat(e),tx_hash:o.transactionHash};r&&""!==r.address&&r.address.toLowerCase()!==i.user_addr.toLowerCase()&&(i.sharer_addr=null==r?void 0:r.address);const a=await(0,y.W)(k.accountInfoUpdate,{method:"POST",data:JSON.stringify(i),headers:{"Content-Type":"application/json"}});a.data&&200==a.data.code&&"1"==="".concat(a.data.data)&&n(void 0)}}catch(e){console.error("PostAccountUpdate Error",e)}}),[e,t,r])}}},97864:(e,t,r)=>{"use strict";r.d(t,{Xo:()=>o,Db:()=>a,Xl:()=>s,ST:()=>u,qg:()=>l});var n=r(2804),i=r(59314);const o=(0,n.cn)({key:"invitationRuleDialog",default:!1,effects_UNSTABLE:[(0,i.Nh)("invitationRuleDialog")]}),a={user_addr:" ",user_cnt:"0",user_cnt_points:"0",share_cnt:"0",share_cnt_points:"0",rank:"0",total:"0"},s=(0,n.cn)({key:"accountInfoState",default:a}),u=((0,n.cn)({key:"accountListInfoState",default:!1}),(0,n.cn)({key:"accountListInfoState",default:[]})),l=(0,n.cn)({key:"invitationAddressState",default:void 0,effects_UNSTABLE:[(0,i.Nh)("invitationAddressState")]})},10071:(e,t,r)=>{"use strict";r.d(t,{E:()=>u,u:()=>l});var n=r(67294),i=r(2804),o=r(9120),a=r(59314);const s=(0,i.cn)({key:"isMobileState",default:!1,effects_UNSTABLE:[(0,a.Nh)("isMobileState")]}),u=(0,n.createContext)(void 0),l=e=>{let{children:t}=e;const[r,a]=(0,i.FV)(s),l=(0,o.Z)();return(0,n.useEffect)((()=>{const e=l.width<768;r!==e&&a(e)}),[l.width,r]),n.createElement(u.Provider,{value:r},t)}},22669:(e,t,r)=>{"use strict";r.d(t,{p5:()=>de,NP:()=>be,rk:()=>ye,gb:()=>ve});var n={};r.r(n),r.d(n,{arbitrum:()=>oe.yX,arbitrumGoerli:()=>oe.Jn,arbitrumNova:()=>oe.ZT,aurora:()=>oe.DM,auroraTestnet:()=>oe.Q7,avalanche:()=>oe.pL,avalancheFuji:()=>oe.cn,base:()=>oe.ue,baseGoerli:()=>oe.J0,boba:()=>oe.jO,bronos:()=>oe.AE,bronosTestnet:()=>oe.fX,bsc:()=>oe.eG,bscTestnet:()=>oe.d2,bxn:()=>oe.Fz,bxnTestnet:()=>oe.mx,canto:()=>oe.iF,celo:()=>oe.DG,celoAlfajores:()=>oe.$X,celoCannoli:()=>oe.qU,classic:()=>oe.Bt,cronos:()=>oe.tg,cronosTestnet:()=>oe.kA,crossbell:()=>oe.r7,dfk:()=>oe.Rp,dogechain:()=>oe.sV,edgeware:()=>oe.Ni,edgewareTestnet:()=>oe.wu,ekta:()=>oe.Og,ektaTestnet:()=>oe.dH,eos:()=>oe.Hn,eosTestnet:()=>oe.KJ,evmos:()=>oe.kI,evmosTestnet:()=>oe.ci,fantom:()=>oe.Q0,fantomTestnet:()=>oe.P7,fibo:()=>oe.KR,filecoin:()=>oe.y1,filecoinCalibration:()=>oe.J9,filecoinHyperspace:()=>oe.eb,flare:()=>oe.vA,flareTestnet:()=>oe.OQ,foundry:()=>oe.tL,fuse:()=>oe.Rd,fuseSparknet:()=>oe.I9,gnosis:()=>oe.KH,gnosisChiado:()=>oe.qv,gobi:()=>oe.NV,goerli:()=>oe.ws,haqqMainnet:()=>oe.WZ,haqqTestedge2:()=>oe.Q8,hardhat:()=>oe.cO,harmonyOne:()=>oe.v$,iotex:()=>oe.pk,iotexTestnet:()=>oe.Vy,klaytn:()=>oe._1,linea:()=>oe.PZ,lineaTestnet:()=>oe.Sz,localhost:()=>oe.dV,mainnet:()=>oe.RJ,mantle:()=>oe.Z,mantleTestnet:()=>oe.bh,metis:()=>oe.tm,metisGoerli:()=>oe.ov,mev:()=>oe.rl,mevTestnet:()=>oe.q_,modeTestnet:()=>oe.JN,moonbaseAlpha:()=>oe.tb,moonbeam:()=>oe.Ai,moonriver:()=>oe.eF,neonDevnet:()=>oe.Xd,nexi:()=>oe.ac,nexilix:()=>oe.cd,oasys:()=>oe.ZZ,okc:()=>oe.mN,optimism:()=>oe.v4,optimismGoerli:()=>oe.l7,polygon:()=>oe.yu,polygonMumbai:()=>oe.v8,polygonZkEvm:()=>oe.mn,polygonZkEvmTestnet:()=>oe.Yu,pulsechain:()=>oe.Fg,pulsechainV4:()=>oe.Pl,qMainnet:()=>oe.oA,qTestnet:()=>oe.BV,rollux:()=>oe.XX,rolluxTestnet:()=>oe.sM,ronin:()=>oe.Ir,saigon:()=>oe.cZ,scrollSepolia:()=>oe.oe,scrollTestnet:()=>oe.gr,sepolia:()=>oe.Fo,shardeumSphinx:()=>oe.lO,skaleBlockBrawlers:()=>oe.N,skaleCalypso:()=>oe.E0,skaleCalypsoTestnet:()=>oe.vk,skaleChaosTestnet:()=>oe.hv,skaleCryptoBlades:()=>oe.LC,skaleCryptoColosseum:()=>oe.uy,skaleEuropa:()=>oe.Ag,skaleEuropaTestnet:()=>oe.$$,skaleExorde:()=>oe.IY,skaleHumanProtocol:()=>oe.NJ,skaleNebula:()=>oe.HM,skaleNebulaTestnet:()=>oe.jt,skaleRazor:()=>oe.K9,skaleTitan:()=>oe.vo,skaleTitanTestnet:()=>oe.cj,songbird:()=>oe.xB,songbirdTestnet:()=>oe.Hf,syscoin:()=>oe.UW,syscoinTestnet:()=>oe.Hy,taikoTestnetSepolia:()=>oe.ML,taraxa:()=>oe.kk,taraxaTestnet:()=>oe.yS,telos:()=>oe.dL,telosTestnet:()=>oe.QO,thunderTestnet:()=>oe.st,wanchain:()=>oe.EA,wanchainTestnet:()=>oe.Hp,xdc:()=>oe.Qi,xdcTestnet:()=>oe.AQ,zetachainAthensTestnet:()=>oe.ht,zhejiang:()=>oe.E7,zkSync:()=>oe.jM,zkSyncTestnet:()=>oe.B$,zora:()=>oe.lx,zoraTestnet:()=>oe.fN});var i,o,a,s,u,l,c,f,d,h,p,m,g,v,y,b,w,_,E,k,C=r(95534),M=r.n(C),x=r(96751),A=(r(67294),r(4424)),S=r(25550),O=r(92221),P=r(42455),N=r(62871),T=r(19575),I=r(46872),R="requestedChains",B="wallet_addEthereumChain",L=class extends A.wR{constructor(e){super({...e,options:{isNewChainsStale:!0,...e.options}}),(0,A.Ko)(this,a),(0,A.Ko)(this,u),(0,A.Ko)(this,c),(0,A.Ko)(this,d),(0,A.Ko)(this,p),(0,A.Ko)(this,g),(0,A.Ko)(this,y),(0,A.Ko)(this,w),(0,A.Ko)(this,E),(0,A.ov)(this,"id","walletConnect"),(0,A.ov)(this,"name","WalletConnect"),(0,A.ov)(this,"ready",!0),(0,A.Ko)(this,i,void 0),(0,A.Ko)(this,o,void 0),(0,A.ov)(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,O.K)(e[0])})})),(0,A.ov)(this,"onChainChanged",(e=>{const t=Number(e),r=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:r}})})),(0,A.ov)(this,"onDisconnect",(()=>{(0,A.U9)(this,g,v).call(this,[]),this.emit("disconnect")})),(0,A.ov)(this,"onDisplayUri",(e=>{this.emit("message",{type:"display_uri",data:e})})),(0,A.ov)(this,"onConnect",(()=>{this.emit("connect",{})})),(0,A.U9)(this,a,s).call(this)}async connect({chainId:e,pairingTopic:t}={}){try{let r=e;if(!r){const e=this.storage?.getItem("store"),t=e?.state?.data?.chain?.id;r=t&&!this.isChainUnsupported(t)?t:this.chains[0]?.id}if(!r)throw new Error("No chains found on connector.");const n=await this.getProvider();(0,A.U9)(this,d,h).call(this);const i=(0,A.U9)(this,c,f).call(this);if(n.session&&i&&await n.disconnect(),!n.session||i){const e=this.chains.filter((e=>e.id!==r)).map((e=>e.id));this.emit("message",{type:"connecting"}),await n.connect({pairingTopic:t,chains:[r],optionalChains:e.length?e:void 0}),(0,A.U9)(this,g,v).call(this,this.chains.map((({id:e})=>e)))}const o=await n.enable(),a=(0,O.K)(o[0]),s=await this.getChainId();return{account:a,chain:{id:s,unsupported:this.isChainUnsupported(s)}}}catch(e){if(/user rejected/i.test(e?.message))throw new P.ab(e);throw e}}async disconnect(){const e=await this.getProvider();try{await e.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{(0,A.U9)(this,p,m).call(this),(0,A.U9)(this,g,v).call(this,[])}}async getAccount(){const{accounts:e}=await this.getProvider();return(0,O.K)(e[0])}async getChainId(){const{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return(0,A.ac)(this,i)||await(0,A.U9)(this,a,s).call(this),e&&await this.switchChain(e),(0,A.ac)(this,i)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,N.K)({account:r,chain:n,transport:(0,T.P)(t)})}async isAuthorized(){try{const[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),r=(0,A.U9)(this,c,f).call(this);if(!e)return!1;if(r&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){const t=this.chains.find((t=>t.id===e));if(!t)throw new P.x3(new Error("chain not found on connector."));try{const r=await this.getProvider(),n=(0,A.U9)(this,w,_).call(this),i=(0,A.U9)(this,E,k).call(this);if(!n.includes(e)&&i.includes(B)){await r.request({method:B,params:[{chainId:(0,I.eC)(t.id),blockExplorerUrls:[t.blockExplorers?.default?.url],chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:[...t.rpcUrls.default.http]}]});const n=(0,A.U9)(this,y,b).call(this);n.push(e),(0,A.U9)(this,g,v).call(this,n)}return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,I.eC)(e)}]}),t}catch(e){if(/user rejected request/i.test("string"==typeof e?e:e?.message))throw new P.ab(e);throw new P.x3(e)}}};i=new WeakMap,o=new WeakMap,a=new WeakSet,s=async function(){return(0,A.ac)(this,o)||"undefined"==typeof window||(0,A.qx)(this,o,(0,A.U9)(this,u,l).call(this)),(0,A.ac)(this,o)},u=new WeakSet,l=async function(){const{EthereumProvider:e,OPTIONAL_EVENTS:t,OPTIONAL_METHODS:n}=await Promise.all([r.e(7222),r.e(7632)]).then(r.bind(r,97632)),[o,...a]=this.chains.map((({id:e})=>e));if(o){const{projectId:r,showQrModal:s=!0,qrModalOptions:u,metadata:l,relayUrl:c}=this.options;(0,A.qx)(this,i,await e.init({showQrModal:s,qrModalOptions:u,projectId:r,optionalMethods:n,optionalEvents:t,chains:[o],optionalChains:a.length?a:void 0,rpcMap:Object.fromEntries(this.chains.map((e=>[e.id,e.rpcUrls.default.http[0]]))),metadata:l,relayUrl:c}))}},c=new WeakSet,f=function(){if((0,A.U9)(this,E,k).call(this).includes(B))return!1;if(!this.options.isNewChainsStale)return!1;const e=(0,A.U9)(this,y,b).call(this),t=this.chains.map((({id:e})=>e)),r=(0,A.U9)(this,w,_).call(this);return!(r.length&&!r.some((e=>t.includes(e))))&&!t.every((t=>e.includes(t)))},d=new WeakSet,h=function(){(0,A.ac)(this,i)&&((0,A.U9)(this,p,m).call(this),(0,A.ac)(this,i).on("accountsChanged",this.onAccountsChanged),(0,A.ac)(this,i).on("chainChanged",this.onChainChanged),(0,A.ac)(this,i).on("disconnect",this.onDisconnect),(0,A.ac)(this,i).on("session_delete",this.onDisconnect),(0,A.ac)(this,i).on("display_uri",this.onDisplayUri),(0,A.ac)(this,i).on("connect",this.onConnect))},p=new WeakSet,m=function(){(0,A.ac)(this,i)&&((0,A.ac)(this,i).removeListener("accountsChanged",this.onAccountsChanged),(0,A.ac)(this,i).removeListener("chainChanged",this.onChainChanged),(0,A.ac)(this,i).removeListener("disconnect",this.onDisconnect),(0,A.ac)(this,i).removeListener("session_delete",this.onDisconnect),(0,A.ac)(this,i).removeListener("display_uri",this.onDisplayUri),(0,A.ac)(this,i).removeListener("connect",this.onConnect))},g=new WeakSet,v=function(e){this.storage?.setItem(R,e)},y=new WeakSet,b=function(){return this.storage?.getItem(R)??[]},w=new WeakSet,_=function(){if(!(0,A.ac)(this,i))return[];const e=(0,A.ac)(this,i).session?.namespaces;if(!e)return[];const t=(0,S.fK)(e).eip155?.chains?.map((e=>parseInt(e.split(":")[1]||"")));return t??[]},E=new WeakSet,k=function(){if(!(0,A.ac)(this,i))return[];const e=(0,A.ac)(this,i).session?.namespaces;if(!e)return[];const t=(0,S.fK)(e).eip155?.methods;return t??[]};x.xZ,x.Bg,x.VQ,x.UG;var j=e=>()=>{let t=-1;const r=[],n=[],i=[],o=[];e.forEach((({groupName:e,wallets:r},o)=>{r.forEach((r=>{if(t++,(null==r?void 0:r.iconAccent)&&!(0,x.A7)(null==r?void 0:r.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${r.name}`);const a={...r,groupIndex:o,groupName:e,index:t};"function"==typeof r.hidden?i.push(a):n.push(a)}))}));return[...n,...i].forEach((({createConnector:e,groupIndex:t,groupName:n,hidden:i,index:a,...s})=>{if("function"==typeof i){if(i({wallets:[...o.map((({connector:e,id:t,installed:r,name:n})=>({connector:e,id:t,installed:r,name:n})))]}))return}const{connector:u,...l}=(c=e(),Object.fromEntries(Object.entries(c).filter((([e,t])=>void 0!==t))));var c;let f;if("walletConnect"===s.id&&l.qrCode&&!(0,x.tq)()){const{chains:e,options:t}=u;f=new L({chains:e,options:{...t,showQrModal:!0}}),r.push(f)}const d={connector:u,groupIndex:t,groupName:n,index:a,walletConnectModalConnector:f,...s,...l};o.push(d),r.includes(u)||(r.push(u),u._wallets=[]),u._wallets.push(d)})),r};function D(){return"undefined"!=typeof navigator&&/android/i.test(navigator.userAgent)}function F(){return"undefined"!=typeof navigator&&/iPhone|iPod/.test(navigator.userAgent)||"undefined"!=typeof navigator&&(/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)}var U,z,q,V=r(53516),H=/(imtoken|metamask|rainbow|trust wallet|uniswap wallet|ledger)/i,G=class extends A.wR{constructor(){super(...arguments),(0,A.Ko)(this,z),(0,A.ov)(this,"id","walletConnectLegacy"),(0,A.ov)(this,"name","WalletConnectLegacy"),(0,A.ov)(this,"ready",!0),(0,A.Ko)(this,U,void 0),(0,A.ov)(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,O.K)(e[0])})})),(0,A.ov)(this,"onChainChanged",(e=>{const t=(0,V.J)(e),r=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:r}})})),(0,A.ov)(this,"onDisconnect",(()=>{this.emit("disconnect")}))}async connect({chainId:e}={}){try{let t=e;if(!t){const e=this.storage?.getItem("store"),r=e?.state?.data?.chain?.id;r&&!this.isChainUnsupported(r)&&(t=r)}const r=await this.getProvider({chainId:t,create:!0});r.on("accountsChanged",this.onAccountsChanged),r.on("chainChanged",this.onChainChanged),r.on("disconnect",this.onDisconnect),setTimeout((()=>this.emit("message",{type:"connecting"})),0);const n=await r.enable(),i=(0,O.K)(n[0]),o=await this.getChainId(),a=this.isChainUnsupported(o),s=r.connector?.peerMeta?.name??"";return H.test(s)&&(this.switchChain=(0,A.U9)(this,z,q)),{account:i,chain:{id:o,unsupported:a}}}catch(e){if(/user closed modal/i.test(e.message))throw new P.ab(e);throw e}}async disconnect(){const e=await this.getProvider();await e.disconnect(),e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect")}async getAccount(){const e=(await this.getProvider()).accounts;return(0,O.K)(e[0])}async getChainId(){const e=await this.getProvider();return(0,V.J)(e.chainId)}async getProvider({chainId:e,create:t}={}){if(!(0,A.ac)(this,U)||e||t){const t=this.options?.infuraId?{}:this.chains.reduce(((e,t)=>({...e,[t.id]:t.rpcUrls.default.http[0]})),{}),n=(await Promise.all([r.e(2592),r.e(7222),r.e(6171)]).then(r.bind(r,76171))).default;(0,A.qx)(this,U,new n({...this.options,chainId:e,rpc:{...t,...this.options?.rpc}})),(0,A.ac)(this,U).http=await(0,A.ac)(this,U).setHttpProvider(e)}return(0,A.ac)(this,U)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return(0,N.K)({account:r,chain:n,transport:(0,T.P)(t)})}async isAuthorized(){try{return!!await this.getAccount()}catch{return!1}}};async function Z(e,t){const r=await e.getProvider();return"2"===t?new Promise((e=>r.once("display_uri",e))):r.connector.uri}U=new WeakMap,z=new WeakSet,q=async function(e){const t=await this.getProvider(),r=(0,I.eC)(e);try{return await Promise.race([t.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]}),new Promise((t=>this.on("change",(({chain:r})=>{r?.id===e&&t(e)}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${r}`,network:`${r}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(e){if(/user rejected request/i.test("string"==typeof e?e:e?.message))throw new P.ab(e);throw new P.x3(e)}};var W=new Map;function K({chains:e,options:t={},projectId:r,version:n="2"}){const i="21fef48091f12692cad574a6f7753643";if("2"===n){if(!r||""===r)throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");"YOUR_PROJECT_ID"!==r&&r!==i||console.warn("Invalid projectId. Please create a unique WalletConnect Cloud projectId for your dApp https://www.rainbowkit.com/docs/installation#configure")}const o={chains:e,options:"1"===n?{qrcode:!1,...t}:{projectId:"YOUR_PROJECT_ID"===r?i:r,showQrModal:!1,...t}},a=JSON.stringify(o),s=W.get(a);return null!=s?s:function(e,t){const r="1"===e?new G(t):new L(t);return W.set(JSON.stringify(t),r),r}(n,o)}var $,Q=r(10823),Y=r(11588),J=class extends Q._{constructor({chains:e,options:t}={}){const r={name:"MetaMask",shimDisconnect:!0,getProvider(){function e(e){if(!!e?.isMetaMask&&(!e.isBraveWallet||e._events||e._state)&&!e.isApexWallet&&!(e.isAvalanche||e.isBitKeep||e.isBlockWallet||e.isCoin98||e.isFordefi||e.isMathWallet||e.isOkxWallet||e.isOKExWallet||e.isOneInchIOSWallet||e.isOneInchAndroidWallet||e.isOpera||e.isPortal||e.isRabby||e.isDefiant||e.isTokenPocket||e.isTokenary||e.isZerion))return e}if("undefined"==typeof window)return;const t=window.ethereum;return t?.providers?t.providers.find(e):e(t)},...t};super({chains:e,options:r}),(0,A.ov)(this,"id","metaMask"),(0,A.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),(0,A.Ko)(this,$,void 0),(0,A.qx)(this,$,r.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:e}={}){try{const t=await this.getProvider();if(!t)throw new Y.N;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let r=null;if((0,A.ac)(this,$)&&this.options?.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey)){r=await this.getAccount().catch((()=>null));if(!!r)try{await t.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),r=await this.getAccount()}catch(e){if(this.isUserRejectedRequestError(e))throw new P.ab(e);if(e.code===new P.pT(e).code)throw e}}if(!r){const e=await t.request({method:"eth_requestAccounts"});r=(0,O.K)(e[0])}let n=await this.getChainId(),i=this.isChainUnsupported(n);if(e&&n!==e){n=(await this.switchChain(e)).id,i=this.isChainUnsupported(n)}return this.options?.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:r,chain:{id:n,unsupported:i},provider:t}}catch(e){if(this.isUserRejectedRequestError(e))throw new P.ab(e);if(-32002===e.code)throw new P.pT(e);throw e}}};function X(e){return!!(null==e?void 0:e.isMetaMask)&&(!(e.isBraveWallet&&!e._events&&!e._state)&&(!e.isApexWallet&&(!e.isAvalanche&&(!e.isBackpack&&(!e.isBifrost&&(!e.isBitKeep&&(!e.isBitski&&(!e.isBlockWallet&&(!e.isCoinbaseWallet&&(!e.isDawn&&(!e.isEnkrypt&&(!e.isExodus&&(!e.isFrame&&(!e.isFrontier&&(!e.isGamestop&&(!e.isHyperPay&&(!e.isImToken&&(!e.isKuCoinWallet&&(!e.isMathWallet&&(!e.isOkxWallet&&!e.isOKExWallet&&(!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&(!e.isOpera&&(!e.isPhantom&&(!e.isPortal&&(!e.isRabby&&(!e.isRainbow&&(!e.isStatus&&(!e.isTalisman&&(!e.isTally&&(!e.isTokenPocket&&(!e.isTokenary&&(!e.isTrust&&!e.isTrustWallet&&(!e.isXDEFI&&!e.isZerion)))))))))))))))))))))))))))))))))}$=new WeakMap;var ee=r(66260),te=r(17726),re=r(27436),ne=r(36286),ie=r(63702),oe=r(31407);var ae=r(47631);function se(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 ue(e){for(var t=1;t{var t;const r=ce.filter((t=>t.id===e));if(r&&r.length){return r[0]}return{id:e,name:ae.GK[e],network:ae.IO[e],nativeCurrency:{name:"".concat(ae.F[e]),symbol:"".concat(ae.F[e]),decimals:18},rpcUrls:{default:{http:ae.Vl[e],webSocket:ae.kD[e]},public:{http:ae.Vl[e],webSocket:ae.kD[e]}},blockExplorers:{default:{name:"".concat(ae.GK[e]," Explorer"),url:null!==(t=M()(ae.M6[e]))&&void 0!==t?t:""}},testnet:ae.Jg[e]}})),{chains:de,publicClient:he,webSocketPublicClient:pe}=(0,ie.QB)(fe,[function(e){return e.rpcUrls.public.http[0]?{chain:e,rpcUrls:e.rpcUrls.public}:null}]),me="bc467c124a7a7a8ce06a41ef40b1b842",ge=j([{groupName:"Recommended",wallets:[(({chains:e,projectId:t,walletConnectOptions:n,walletConnectVersion:i="2",...o})=>{var a,s;const u="undefined"!=typeof window&&(null==(a=window.ethereum)?void 0:a.providers),l="undefined"!=typeof window&&void 0!==window.ethereum&&((null==(s=window.ethereum.providers)?void 0:s.some(X))||window.ethereum.isMetaMask),c=!l;return{id:"metaMask",name:"MetaMask",iconUrl:async()=>(await r.e(9531).then(r.bind(r,69531))).default,iconAccent:"#f6851a",iconBackground:"transparent",installed:c?void 0:l,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},createConnector:()=>{const r=c?K({projectId:t,chains:e,version:i,options:n}):new J({chains:e,options:{getProvider:()=>u?u.find(X):"undefined"!=typeof window?window.ethereum:void 0,...o}}),a=async()=>{const e=await Z(r,i);return D()?e:F()?`metamask://wc?uri=${encodeURIComponent(e)}`:`https://metamask.app.link/wc?uri=${encodeURIComponent(e)}`};return{connector:r,mobile:{getUri:c?a:void 0},qrCode:c?{getUri:a,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"We recommend putting MetaMask on your home screen for quicker access.",step:"install",title:"Open the MetaMask app"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"We recommend pinning MetaMask to your taskbar for quicker access to your wallet.",step:"install",title:"Install the MetaMask extension"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",step:"refresh",title:"Refresh your browser"}]}}}}}})({projectId:me,chains:de}),(({chains:e,options:t,projectId:n,version:i="2"})=>({id:"walletConnect",name:"WalletConnect",iconUrl:async()=>(await r.e(4039).then(r.bind(r,84039))).default,iconBackground:"#3b99fc",createConnector:()=>{const r=F(),o=K("1"===i?{version:"1",chains:e,options:{qrcode:r,...t}}:{version:"2",chains:e,projectId:n,options:{showQrModal:r,...t}}),a=async()=>Z(o,i);return{connector:o,...r?{}:{mobile:{getUri:a},qrCode:{getUri:a}}}}}))({projectId:me,chains:de})]},{groupName:"More",wallets:[(({chains:e,projectId:t,walletConnectOptions:n,walletConnectVersion:i="2",...o})=>{const a="undefined"!=typeof window&&void 0!==window.bitkeep&&void 0!==window.bitkeep.ethereum&&!0===window.bitkeep.ethereum.isBitKeep,s=!a;return{id:"bitGet",name:"Bitget Wallet",iconUrl:async()=>(await r.e(9611).then(r.bind(r,79611))).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:s?void 0:a,downloadUrls:{android:"https://bitkeep.com/en/download?type=2",ios:"https://apps.apple.com/app/bitkeep/id1395301115",mobile:"https://bitkeep.com/en/download?type=2",qrCode:"https://bitkeep.com/en/download",chrome:"https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",browserExtension:"https://bitkeep.com/en/download"},createConnector:()=>{const r=s?K({chains:e,options:n,projectId:t,version:i}):new Q._({chains:e,options:{getProvider:()=>window.bitkeep.ethereum,...o}});return{connector:r,extension:{instructions:{learnMoreUrl:"https://study.bitkeep.com",steps:[{description:"We recommend pinning BitKeep to your taskbar for quicker access to your wallet.",step:"install",title:"Install the BitKeep extension"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",step:"refresh",title:"Refresh your browser"}]}},mobile:{getUri:s?async()=>{const e=await Z(r,i);return D()?e:`bitkeep://wc?uri=${encodeURIComponent(e)}`}:void 0},qrCode:s?{getUri:async()=>Z(r,i),instructions:{learnMoreUrl:"https://study.bitkeep.com",steps:[{description:"We recommend putting BitKeep on your home screen for quicker access.",step:"install",title:"Open the BitKeep app"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}}:void 0}}}})({projectId:me,chains:de}),(({chains:e,projectId:t,walletConnectOptions:n,walletConnectVersion:i="2",...o})=>{const a=!("undefined"!=typeof window&&void 0!==window.okxwallet);return{id:"okx",name:"OKX Wallet",iconUrl:async()=>(await r.e(3258).then(r.bind(r,33258))).default,iconAccent:"#000",iconBackground:"#000",downloadUrls:{android:"https://play.google.com/store/apps/details?id=com.okinc.okex.gp",ios:"https://itunes.apple.com/app/id1327268470?mt=8",mobile:"https://okx.com/download",qrCode:"https://okx.com/download",chrome:"https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",edge:"https://microsoftedge.microsoft.com/addons/detail/okx-wallet/pbpjkcldjiffchgbbndmhojiacbgflha",firefox:"https://addons.mozilla.org/firefox/addon/okexwallet/",browserExtension:"https://okx.com/download"},createConnector:()=>{const r=a?K({projectId:t,chains:e,version:i,options:n}):new Q._({chains:e,options:{getProvider:()=>window.okxwallet,...o}});return{connector:r,mobile:{getUri:a?async()=>{const e=await Z(r,i);return D()?e:`okex://main/wc?uri=${encodeURIComponent(e)}`}:void 0},qrCode:a?{getUri:async()=>Z(r,i),instructions:{learnMoreUrl:"https://okx.com/web3/",steps:[{description:"We recommend putting OKX Wallet on your home screen for quicker access.",step:"install",title:"Open the OKX Wallet app"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://okx.com/web3/",steps:[{description:"We recommend pinning OKX Wallet to your taskbar for quicker access to your wallet.",step:"install",title:"Install the OKX Wallet extension"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",step:"refresh",title:"Refresh your browser"}]}}}}}})({projectId:me,chains:de}),(({chains:e,projectId:t,walletConnectOptions:n,walletConnectVersion:i="2"})=>{var o;const a="undefined"!=typeof window&&!0===(null==(o=window.ethereum)?void 0:o.isTokenPocket),s=!a;return{id:"tokenPocket",name:"TokenPocket",iconUrl:async()=>(await r.e(6856).then(r.bind(r,46856))).default,iconBackground:"#2980FE",installed:s?void 0:a,downloadUrls:{chrome:"https://chrome.google.com/webstore/detail/tokenpocket/mfgccjchihfkkindfppnaooecgfneiii",browserExtension:"https://extension.tokenpocket.pro/",android:"https://play.google.com/store/apps/details?id=vip.mytokenpocket",ios:"https://apps.apple.com/us/app/tp-global-wallet/id6444625622",qrCode:"https://tokenpocket.pro/en/download/app",mobile:"https://tokenpocket.pro/en/download/app"},createConnector:()=>{const r=s?K({chains:e,projectId:t,options:n,version:i}):new Q._({chains:e}),o=async()=>{const e=await Z(r,i);return D()||F()?`tpoutside://wc?uri=${encodeURIComponent(e)}`:e};return{connector:r,mobile:{getUri:s?o:void 0},qrCode:s?{getUri:o,instructions:{learnMoreUrl:"https://help.tokenpocket.pro/en/",steps:[{description:"We recommend putting TokenPocket on your home screen for quicker access.",step:"install",title:"Open the TokenPocket app"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"After you scan, a connection prompt will appear for you to connect your wallet.",step:"scan",title:"Tap the scan button"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://help.tokenpocket.pro/en/extension-wallet/faq/installation-tutorial",steps:[{description:"We recommend pinning TokenPocket to your taskbar for quicker access to your wallet.",step:"install",title:"Install the TokenPocket extension"},{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",step:"create",title:"Create or Import a Wallet"},{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",step:"refresh",title:"Refresh your browser"}]}}}}}})({projectId:me,chains:de})]}]),ve=(0,ne._g)({autoConnect:!0,connectors:ge,publicClient:he,webSocketPublicClient:pe}),ye=de.reduce(((e,t)=>ue(ue({},e),{},{[t.id]:(0,ee.v)({chain:t,transport:(0,te.t)(ae.Vl[t.id].map((e=>(0,re.d)(e,{timeout:15e3}))),{rank:!1}),batch:{multicall:{batchSize:t.id===ae.a_.POLYGON_ZKEVM?128:204800}}})})),{}),be=e=>{let{chainId:t}=e;return ye[t]}},37917:(e,t,r)=>{"use strict";r.d(t,{T:()=>i,C:()=>o});var n=r(61992);const i=()=>(0,n.I0)(),o=n.v9},95362:(e,t,r)=>{"use strict";r.d(t,{k:()=>s,U:()=>u});var n=r(67294),i=r(61992),o=r(37917),a=r(83942);const s=()=>{const e=(0,o.T)();(0,n.useEffect)((()=>{e((0,a.D)())}),[e])},u=()=>(0,i.v9)((e=>e.price.tokenPrice))},83942:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s,D:()=>a});var n=r(35840),i=r(80941),o=r(47631);const a=(0,n.hg)("price/fetchPriceAsync",(async()=>await(async()=>{try{const e=[...new Set(Object.values(o.F))],t=["1"],r=await(0,i.W)("https://li.quest/v1/tokens",{method:"GET",params:{chains:t.join(",")}}),n={};for(let t=0;tr.symbol.toLowerCase()===e[t].toLowerCase()))[0];i?n[e[t]]=i.priceUSD:console.log({currency:e[t]})}return console.log({obj:n}),n}catch(e){return}})())),s=(0,n.oM)({name:"price",initialState:{tokenPrice:{}},reducers:{},extraReducers:e=>{e.addCase(a.fulfilled,((e,t)=>{t.payload&&(e.tokenPrice=t.payload)}))}}).reducer},70064:(e,t,r)=>{"use strict";r.d(t,{eq:()=>o,ZP:()=>a});const n={success:void 0,error:void 0,selectedChainId:void 0},i=(0,r(35840).oM)({name:"user",initialState:n,reducers:{changeUserStateValue:(e,t)=>{const r=t.payload.key,n=t.payload.value;e[r]=n}}}),{changeUserStateValue:o}=i.actions,a=i.reducer},46286:(e,t,r)=>{"use strict";r.d(t,{d:()=>u,x:()=>l});var n=r(70064);let i;!function(e){e.NotEnoughFunds="NotEnoughFunds",e.UserDenied="UserDenied",e.NetworkChanged="NetworkChanged",e.RpcError="RpcError",e.TradeSlippage="TradeSlippage",e.WalletSetup="WalletSetup"}(i||(i={}));const o={[i.TradeSlippage]:[{message:"Insufficient balance after any settlement owing"},{name:"TotalCostOutsideOfSpecifiedBounds"}],[i.UserDenied]:[{message:"User denied transaction signature"},{message:"User rejected"},{message:"Reject by the user"},{message:"Cannot set properties of undefined (setting 'loadingDefaults')"},{message:"Sign request rejected by user"},{message:"Canceled"},{message:"Cancelled"},{message:"Error: Cancelled"},{message:"Action cancelled by user"},{message:"Error: Interaction timeout"},{message:"Error: Popup closed"},{message:"Request rejected"},{code:"ACTION_REJECTED"},{code:4001}],[i.NotEnoughFunds]:[{message:"Not enough funds for gas"},{message:"Failed to execute call with revert code InsufficientGasFunds"},{message:"execution reverted: ERC20: transfer amount exceeds balance"}],[i.WalletSetup]:[{message:"Manifest not set. Read more at https://github.com/trezor/connect/blob/develop/docs/index.md"},{message:"U2F browser support is needed for Ledger. Please use Chrome, Opera or Firefox with a U2F extension."},{message:"Error: device disconnected during action"},{message:"Error: Device is used in another window"},{message:"Error: Device not found"},{message:"Error: Failed to execute 'transferIn' on 'USBDevice': A transfer error has occurred."},{message:"Error: Initialize failed: device disconnected during action, code: undefined"},{message:"Error: Initialize failed: Didn't receive expected header signature., code: undefined"},{message:"Error: session not found"},{message:"Error: wrong previous session"},{message:"Failed to sign with Ledger device: U2F DEVICE_INELIGIBLE"},{message:"Failed to sign with Ledger device: U2F OTHER_ERROR"},{message:"Ledger device:"},{message:"Ledger:"},{message:"LEDGER_WRONG_APP"},{message:"MetaMask is having trouble connecting to the network"},{message:"nonce too low"},{message:"nonce has already been used"},{message:"Please enable Blind signing or Contract data in the Ethereum app Settings"},{message:"Failed to execute 'requestDevice' on 'HID': Must be handling a user gesture to show a permission request."},{message:"An error while signing the transaction ocurred"}],[i.NetworkChanged]:[{message:"Underlying network changed"}],[i.RpcError]:[{code:-32005},{message:"Non-200 status code"},{message:"Request limit exceeded"},{message:"Internal json-rpc error"},{message:"Response has no error or result"},{message:"We can't execute this request"},{message:"Couldn't connect to the network"}]},a=(e,t)=>{var r,n,i,s,u,l,c,f,d,h;const p=null!==(r=null!==(n=null!==(i=null==e||null===(s=e.error)||void 0===s?void 0:s.error)&&void 0!==i?i:null==e?void 0:e.error)&&void 0!==n?n:null==e?void 0:e.reason)&&void 0!==r?r:e,m=null==p?void 0:p.code,g=null!==(u=null==p||null===(l=p.data)||void 0===l?void 0:l.data)&&void 0!==u?u:null==p?void 0:p.data;let v=null;if(g&&t)try{v=t.interface.parseError(g)}catch(e){}const y="string"==typeof p?p:null!==(c=null!==(f=null!==(d=null==p?void 0:p.message)&&void 0!==d?d:null==p||null===(h=p.data)||void 0===h?void 0:h.message)&&void 0!==f?f:null==p?void 0:p.reason)&&void 0!==c?c:null==e?void 0:e.reason,b=null==y?void 0:y.split("[ethjs-query] while formatting outputs from RPC ");if(b&&b.length>1){var w;const e=b[1].replaceAll("'",""),r=JSON.parse(e);return a(null!==(w=r.value)&&void 0!==w?w:r,t)}if(y&&y.includes("Error: {")){const e=(null==y?void 0:y.split("Error: "))[1].replaceAll("'",'"');return a(JSON.parse(e),t)}for(const[t,r]of Object.entries(o))for(const n of r){const r=n.code&&m===n.code,i=n.message&&y&&y.toLowerCase().includes(n.message.toLowerCase()),o=n.name&&v&&v.name.toLowerCase().includes(n.name.toLowerCase());if(r||i||o)return{code:m,message:y,data:g,description:v,reason:t,rawError:e}}return{code:m,message:y,data:g,description:v,rawError:e}},s=a,u=function(e,t,r){const{name:i,message:o,shortMessage:a}=t,u={name:"",message:""};if(i&&"Error"!==i)u.name=i,u.message=null!=a?a:o;else{var l,c;const e=s(t,r);u.name=null!==(l=e.reason)&&void 0!==l?l:"Error",u.message=null!==(c=e.message)&&void 0!==c?c:""}e((0,n.eq)({key:"error",value:u}))},l=function(e,t){e((0,n.eq)({key:"success",value:t}))}},7387:(e,t,r)=>{"use strict";r.d(t,{O:()=>n});const n="develop"},57142:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});r(75314);var n=r(11187),i=r(20640),o=r.n(i);const a=e=>{n.default.destroy(),o()(e)?n.default.success({content:"Copy Success",className:"customMessage",style:{marginTop:"50vh"}}):n.default.error({content:"Copy fail",className:"customMessage",style:{marginTop:"50vh"}})}},33030:(e,t,r)=>{"use strict";r.d(t,{GI:()=>n,n4:()=>i,xz:()=>o,_X:()=>a});const n=()=>{const e=new Date;return Math.floor(e.getTime()/1e3)};function i(e){let t=Math.floor(e/86400)+68569+2440588;const r=Math.floor(4*t/146097);t-=Math.floor((146097*r+3)/4);let n=Math.floor(4e3*(t+1)/1461001);t=t-Math.floor(1461*n/4)+31;let i=Math.floor(80*t/2447);const o=t-Math.floor(2447*i/80);return t=Math.floor(i/11),i=i+2-12*t,n=100*(r-49)+n+t,"".concat(n.toFixed(0)).concat(i.toFixed(0)).concat(o.toFixed(0))}const o=e=>{const t=new Date(1e3*e),r=t.getHours(),n=t.getMinutes(),i=t.getDate(),o=t.getMonth()+1;return"".concat(r.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"0")," ").concat(i,"/").concat(o)},a=e=>{const t=new Date(1e3*e),r=t.getHours(),n=t.getMinutes(),i=t.getDate(),o=t.getMonth()+1;return"".concat(r.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"0")," ").concat(i,"-").concat(o)}},60215:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(55835);const i=e=>{const t=function(e){if(!e)return 1;const t=n.createHash("sha256").update(e).digest("hex");return parseInt(t.slice(0,16),16)}(e);return e?{selectedAvatar:["/img/avatar1.png","/img/avatar2.png","/img/avatar3.png","/img/avatar4.png","/img/avatar5.png"][t%6],selectedBackground:["#83A285","#A083AE","#FF637F","#FFA26D","#77BEFF","#80F0BA","#FFCF4E","#FF603E","#F44242","#D57CFF","#7075FF","#808242","#804343","#FF56B1","#6992A9"][t%15]}:{selectedAvatar:"/img/default_avatar.png",selectedBackground:"#EFEFEF"}}},80941:(e,t,r)=>{"use strict";r.d(t,{W:()=>a});var n=r(9669),i=r.n(n);function o(e){if(e.status>=200&&e.status<300)return e;throw new Error(e.statusText)}async function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{method:"GET"};const r=await i()(e,t).then(o).catch((e=>{throw e}));return r}i().defaults.withCredentials=!1},88017:(e,t,r)=>{"use strict";r.d(t,{wA:()=>o,lb:()=>s,LM:()=>u});var n=r(44431),i=r.n(n);i().config({EXPONENTIAL_AT:1e9});function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:18;return e?new(i())(e).dividedBy(new(i())(10).pow(t)):new(i())(0)}const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(void 0===e)return"";let r=e.toString();const n=r.indexOf(".");return r=-1!==n?r.substring(0,t+n+1):r.substring(0),parseFloat(r).toFixed(t)},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;try{if(isNaN(Number(e)))return Number(0).toFixed(t>0?t:0);if(0===e)return Number("0").toFixed(t);if("".concat(e)===e.toFixed(0))return"".concat(e,".00");const r=e<0,n=a(Math.abs(Number(e)),t>0?t:0),i=n.split(".")[0].split("").reverse(),o=n.split(".")[1];let s="";for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:6,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4;if(!e)return"";const n=e.substring(0,t),i=e.substring(e.length-r,e.length);return"".concat(n,"...").concat(i)}},80652:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(94184),i=r.n(n),o=r(67294);const a=r(49566);var s;(s=a).keys().map(s);const u=e=>o.createElement("svg",{className:i()("icon",e.className)},o.createElement("use",{xlinkHref:"#"+e.name}))},47631:(e,t,r)=>{"use strict";r.d(t,{M6:()=>v,a_:()=>d,Tf:()=>_,GK:()=>y,IO:()=>b,Vl:()=>m,kD:()=>g,F:()=>E,QO:()=>M,Xw:()=>k,iJ:()=>x,GV:()=>l,x5:()=>h,VW:()=>P,$d:()=>c,d8:()=>O,Jg:()=>w,KC:()=>p,pQ:()=>f,$y:()=>A,Cf:()=>S});var n=r(9279);const i=JSON.parse('{"97":{"release":{"ZkBingoLobby":"0xDC0934c442B5eA659df63995ae741aB73275DF52","ZkBingoCard":"0xc0cC06497888Dc4fd48Ba332E6F0A3e78EB6b0B9","Reward":"0x0BA0fe3305E77DdCd18704356Bac4708dCCC3085"}},"204":{"release":{"ZkBingoCard":"0x8F4F21308a7c16d0E1d3d851B0E2547ff652287F","ZkBingoLobby":"0xEEcaAE0E7C68bCc0e232c8229310991A0106f1C4","Reward":"0x0269c2a29dbD73C6F13f45850A12B14D98DCe613"}},"420":{"release":{"ZkBingoLobby":"0xc3B2ea66D2341323FA7eB350886d6C602755ff6F","ZkBingoCard":"0x1Bf81c935C8A22a49046Ad22a89459897f8D74C4","Reward":"0x2E181EbD39d916596b6256d2807107811Ff8033d"}},"1205":{"release":{"ZkBingoLobby":"0x2f036a12E4793ce4F921D88866418AA1918092fA","ZkBingoCard":"0x9e746A9B484B820B7d4ABbA21FF6EF284546b22e","Reward":"0x65b0ec8dc0680020D0B113D411aE87940f71cb77"}},"1442":{"release":{"ZkBingoLobby":"0x67623bb515A2AE71278cF89D82e0f3A882761700","ZkBingoCard":"0xBE9B293a533B4eD165c9e89A05E162d7cdA40ABA","Reward":"0xB34117892b9CDe8838045115FDA6b535d558efA9"},"develop":{"ZkBingoCard":"0x227DEE6a84f9C44A7Ffb00ef048D5670f3598214","ZkBingoLobby":"0x79b0a02E139261b4FB08a48e5e995EBa2C840D97","Reward":"0x46ebA5CA090f1199964297f5b1DAA55f45b22191"}},"5611":{"release":{"ZkBingoLobby":"0xE8cc6D97a7FA763dFF87e0092b819C5f7438671F","ZkBingoCard":"0xa64db6FA94F16737D9e3C11347868433C365D075","Reward":"0x0d298d026C7a9111231fFad9111c31fc838927fe"},"develop":{"ZkBingoCard":"0xADeCc6c102D2806Ef45D3bc4630cb2E8C253B8Fa","ZkBingoLobby":"0x221Ecf7C88103490dAC756bbe5Aa6CE4B8965d41","Reward":"0x307160048753217c567b891E4720cc93e18aEA64"}},"9527":{"release":{"ZkBingoLobby":"0x9feb4CAcB91B0D21B5f3988bA8b228753b9de8b4","ZkBingoCard":"0xCB7d119AE42ad31d9bC5B4506D9D9EE2650845d0","Reward":"0x0951e6B5D5C22Bedae722941a424Ce5Bdf1A6e35"}},"42161":{"release":{"date":"2023-08-14T04:31:20.327Z","chainId":42161,"deployer":"0xBdD77C7F3e6473B1eEe508f44Cf5e2250e8036eC","ZkBingoCard":"0x14ab1f4d8F10D029fe7070A72E3e68462c652a19","ZkBingoLobby":"0x2e6190c90ca9aFc4D39c02b1E680Fb7183fA4a83","Reward":"0xC923Ad4a082deDfC0B9e38e68983D9b8d4178D4A"}},"59140":{"release":{"ZkBingoLobby":"0xb29cAa2cB1fEb7f4cCaa9Dd9B8Ad2022EaCa6EC3","ZkBingoCard":"0xC9108a21e461C71331C1317B38C57DDB8B7B0264","Reward":"0x0a882D83A3d3160A6eF5192f03A79AFC40208BDe"}},"59144":{"release":{"ZkBingoLobby":"0xb29cAa2cB1fEb7f4cCaa9Dd9B8Ad2022EaCa6EC3","ZkBingoCard":"0xC9108a21e461C71331C1317B38C57DDB8B7B0264","Reward":"0x0a882D83A3d3160A6eF5192f03A79AFC40208BDe"}},"80001":{"release":{"ZkBingoLobby":"0x67623bb515A2AE71278cF89D82e0f3A882761700","ZkBingoCard":"0xBE9B293a533B4eD165c9e89A05E162d7cdA40ABA","Reward":"0xB34117892b9CDe8838045115FDA6b535d558efA9"}},"421613":{"release":{"ZkBingoLobby":"0xD414aCC27888A46E2D4C2467A673D7297d160205","ZkBingoCard":"0xc9d65b20aE614718b18d7d7403d335f865221D21","Reward":"0x150B6334E09d0F1DFf5E54aAc78e52D07E588335"},"develop":{"ZkBingoCard":"0x94203a79b5da3e4cFD1988651C5D28c35f1e3eF2","ZkBingoLobby":"0x665A11007164B1dBECf6c7C6392C4ffE28a5282c","Reward":"0xb019a7Cfca9ec41b59170eBda342790FF6FD60D7","BlindBox":"0x5574A08191C7E899955425D4eDEb26baFDf081c0"}},"534351":{"develop":{"date":"2023-08-22T03:52:12.563Z","chainId":534351,"deployer":"0x1C0ad2c17E848Fb3ccefEc1b77477bCadDA1d103","ZkBingoCard":"0x85c00a08358d5602fd7B529AaDd156BBF9710AC2","ZkBingoLobby":"0x4122E927d082247b51d73D27EdF836051c905EC9","Reward":"0x2676cEF85550765fc893A9bd053587a175C32377"}},"534353":{"develop":{"date":"2023-08-16T07:29:26.176Z","chainId":534353,"deployer":"0x1C0ad2c17E848Fb3ccefEc1b77477bCadDA1d103","ZkBingoCard":"0x6a056940521dCf81583442ABA3f9F3A0EDf5647C","ZkBingoLobby":"0x3a7B56735270aB30E486573211E786475A1bF9B5","Reward":"0x6Ca24199a73D79e944132B9404b72B383196E2EF"}}}'),o=JSON.parse('{"97":{"release":{"ZkBingoLobby":"0xDC0934c442B5eA659df63995ae741aB73275DF52","ZkBingoCard":"0xc0cC06497888Dc4fd48Ba332E6F0A3e78EB6b0B9","Reward":"0x0BA0fe3305E77DdCd18704356Bac4708dCCC3085"}},"204":{"release":{"ZkBingoCard":"0x8F4F21308a7c16d0E1d3d851B0E2547ff652287F","ZkBingoLobby":"0xEEcaAE0E7C68bCc0e232c8229310991A0106f1C4","Reward":"0x0269c2a29dbD73C6F13f45850A12B14D98DCe613","ZypherGameToken":"0xA1d350c642E41cdD17a6dDC5cf9545964a3217f2","ZkBingoPoints":"0x4C0AB2873aE31146F275C8460EF6240298Fe973c"}},"420":{"release":{"ZkBingoLobby":"0xc3B2ea66D2341323FA7eB350886d6C602755ff6F","ZkBingoCard":"0x1Bf81c935C8A22a49046Ad22a89459897f8D74C4","Reward":"0x2E181EbD39d916596b6256d2807107811Ff8033d"}},"1205":{"release":{"ZkBingoLobby":"0x2f036a12E4793ce4F921D88866418AA1918092fA","ZkBingoCard":"0x9e746A9B484B820B7d4ABbA21FF6EF284546b22e","Reward":"0x65b0ec8dc0680020D0B113D411aE87940f71cb77"}},"1442":{"release":{"ZkBingoLobby":"0x67623bb515A2AE71278cF89D82e0f3A882761700","ZkBingoCard":"0xBE9B293a533B4eD165c9e89A05E162d7cdA40ABA","Reward":"0xB34117892b9CDe8838045115FDA6b535d558efA9"},"develop":{"ZkBingoCard":"0x227DEE6a84f9C44A7Ffb00ef048D5670f3598214","ZkBingoLobby":"0x79b0a02E139261b4FB08a48e5e995EBa2C840D97","Reward":"0x46ebA5CA090f1199964297f5b1DAA55f45b22191"}},"5611":{"release":{"ZkBingoLobby":"0xE8cc6D97a7FA763dFF87e0092b819C5f7438671F","ZkBingoCard":"0xa64db6FA94F16737D9e3C11347868433C365D075","Reward":"0x0d298d026C7a9111231fFad9111c31fc838927fe"},"develop":{"ZkBingoCard":"0xADeCc6c102D2806Ef45D3bc4630cb2E8C253B8Fa","ZkBingoLobby":"0x221Ecf7C88103490dAC756bbe5Aa6CE4B8965d41","Reward":"0x307160048753217c567b891E4720cc93e18aEA64","ZkBingoToken":"0xc2E571531AB5A353534b73D15c187E78DD57dCA9","ZkBingoPoints":"0x66ACa3e3ecEb622A0239B8a1Bb52f1E86a5E81ca"}},"9527":{"release":{"ZkBingoLobby":"0x9feb4CAcB91B0D21B5f3988bA8b228753b9de8b4","ZkBingoCard":"0xCB7d119AE42ad31d9bC5B4506D9D9EE2650845d0","Reward":"0x0951e6B5D5C22Bedae722941a424Ce5Bdf1A6e35"}},"31337":{"develop":{"date":"2023-08-31T05:11:55.971Z","chainId":31337,"deployer":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","ZkBingoToken":"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0","ZkBingoCard":"0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9","ZkBingoLobby":"0xa513E6E4b8f2a923D98304ec87F64353C4D5C853"}},"42161":{"release":{"date":"2023-08-14T04:31:20.327Z","chainId":42161,"deployer":"0xBdD77C7F3e6473B1eEe508f44Cf5e2250e8036eC","ZkBingoCard":"0x14ab1f4d8F10D029fe7070A72E3e68462c652a19","ZkBingoLobby":"0x2e6190c90ca9aFc4D39c02b1E680Fb7183fA4a83","Reward":"0xC923Ad4a082deDfC0B9e38e68983D9b8d4178D4A"}},"59140":{"release":{"ZkBingoLobby":"0xb29cAa2cB1fEb7f4cCaa9Dd9B8Ad2022EaCa6EC3","ZkBingoCard":"0xC9108a21e461C71331C1317B38C57DDB8B7B0264","Reward":"0x0a882D83A3d3160A6eF5192f03A79AFC40208BDe"},"develop":{"ZkBingoToken":"0x5275A8593ce6a967Ae6782a70F417135A44bCd27","ZkBingoPoints":"0x3B5b13A1Edb63489c35d588E8259AF7C5c6165fB"}},"59144":{"release":{"ZkBingoLobby":"0xb29cAa2cB1fEb7f4cCaa9Dd9B8Ad2022EaCa6EC3","ZkBingoCard":"0xC9108a21e461C71331C1317B38C57DDB8B7B0264","Reward":"0x0a882D83A3d3160A6eF5192f03A79AFC40208BDe","ZypherGameToken":"0x6ba3593101E32cEdBDE5AC9439e9187736B26A15","ZkBingoPoints":"0x244aF35FDeC6A9A10BD6eA1357bC267bC4Ef6f55"}},"80001":{"release":{"ZkBingoLobby":"0x67623bb515A2AE71278cF89D82e0f3A882761700","ZkBingoCard":"0xBE9B293a533B4eD165c9e89A05E162d7cdA40ABA","Reward":"0xB34117892b9CDe8838045115FDA6b535d558efA9"}},"421613":{"release":{"ZkBingoLobby":"0xD414aCC27888A46E2D4C2467A673D7297d160205","ZkBingoCard":"0xc9d65b20aE614718b18d7d7403d335f865221D21","Reward":"0x150B6334E09d0F1DFf5E54aAc78e52D07E588335"},"develop":{"date":"2023-09-13T09:59:26.587Z","chainId":421613,"deployer":"0x35f6951F23D090Fe498044610Ac5587F9486Cf11","ZkBingoToken":"0x3622Cb4Ac04A4Ff484558BEB3D22E02AD6CeE8Ad","ZkBingoCard":"0x728a265C324F5346889D1958db88783D9653f2BB","ZkBingoLobby":"0xFEd9F17bdEdd6cde7281Fa0Ec438F5FA5969794D","ZkBingoFee":"0x6289b158672Eaa1f810bF1234Bcbdad5C9e167B2","ZkBingoPoints":"0x4c907b90646aB79daE7eC4534835839eA8387033"}},"534351":{"develop":{"date":"2023-08-22T03:52:12.563Z","chainId":534351,"deployer":"0x1C0ad2c17E848Fb3ccefEc1b77477bCadDA1d103","ZkBingoCard":"0x85c00a08358d5602fd7B529AaDd156BBF9710AC2","ZkBingoLobby":"0x4122E927d082247b51d73D27EdF836051c905EC9","Reward":"0x2676cEF85550765fc893A9bd053587a175C32377"}},"534353":{"develop":{"date":"2023-08-16T07:29:26.176Z","chainId":534353,"deployer":"0x1C0ad2c17E848Fb3ccefEc1b77477bCadDA1d103","ZkBingoCard":"0x6a056940521dCf81583442ABA3f9F3A0EDf5647C","ZkBingoLobby":"0x3a7B56735270aB30E486573211E786475A1bF9B5","Reward":"0x6Ca24199a73D79e944132B9404b72B383196E2EF"}}}');var a=r(44431),s=r.n(a),u=r(7387);const l={appName:"Zypher Game"},c=new(s())("10").exponentiatedBy(18),f="success";let d;!function(e){e[e.Mainnet=56]="Mainnet",e[e.Testnet=97]="Testnet",e[e.Arbitrum=42161]="Arbitrum",e[e.ArbitrumRinkeby=421611]="ArbitrumRinkeby",e[e.ThunderCore=108]="ThunderCore",e[e.ThunderCoreTestnet=18]="ThunderCoreTestnet",e[e.FindoraTest=1205]="FindoraTest",e[e.LineaTestnet=59140]="LineaTestnet",e[e.LineaMainnet=59144]="LineaMainnet",e[e.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",e[e.POLYGON_ZKEVM=1442]="POLYGON_ZKEVM",e[e.ArbitrumGoerli=421613]="ArbitrumGoerli",e[e.ScrollAlphaTestnet=534353]="ScrollAlphaTestnet",e[e.OPBNBTEST=5611]="OPBNBTEST",e[e.OPBNB=204]="OPBNB",e[e.ScrollSepoliaTestnet=534351]="ScrollSepoliaTestnet"}(d||(d={}));d.ArbitrumGoerli,d.POLYGON_ZKEVM,d.OPBNB,d.ScrollSepoliaTestnet,d.LineaMainnet,d.Arbitrum,d.OPBNB,d.ScrollSepoliaTestnet;const h="develop"===u.O?d.ArbitrumGoerli:d.LineaMainnet,p="develop"===u.O?[d.LineaMainnet,d.LineaTestnet,d.OPBNB,d.OPBNBTEST,d.Arbitrum]:[d.LineaMainnet,d.OPBNB,d.Arbitrum],m={[d.Mainnet]:["https://bsc-dataseed1.binance.org"],[d.Testnet]:["https://endpoints.omniatech.io/v1/bsc/testnet/public","https://bsc-testnet.publicnode.com"],[d.Arbitrum]:["https://arb1.arbitrum.io/rpc"],[d.ArbitrumRinkeby]:["https://rinkeby.arbitrum.io/rpc"],[d.ThunderCore]:["https://mainnet-rpc.thundercore.com"],[d.ThunderCoreTestnet]:["https://testnet-rpc.thundercore.com"],[d.FindoraTest]:["https://gsc-testnet.prod.findora.org:8545"],[d.LineaTestnet]:["https://rpc.goerli.linea.build"],[d.LineaMainnet]:["https://rpc.linea.build"],[d.POLYGON_MUMBAI]:["https://polygon-mumbai-bor.publicnode.com","https://matic-mumbai.chainstacklabs.com","https://rpc-mumbai.maticvigil.com","https://matic-testnet-archive-rpc.bwarelabs.com"],[d.ArbitrumGoerli]:["https://endpoints.omniatech.io/v1/arbitrum/goerli/public","https://goerli-rollup.arbitrum.io/rpc"],[d.POLYGON_ZKEVM]:["https://rpc.public.zkevm-test.net"],[d.OPBNBTEST]:["https://opbnb-testnet-rpc.bnbchain.org/"],[d.OPBNB]:["https://opbnb-mainnet-rpc.bnbchain.org"],[d.ScrollSepoliaTestnet]:["https://sepolia-rpc.scroll.io/"],[d.ScrollAlphaTestnet]:["https://scroll-alpha-public.unifra.io"]},g={[d.ArbitrumGoerli]:["wss://arbitrum-goerli.publicnode.com"],[d.POLYGON_ZKEVM]:[],[d.ScrollAlphaTestnet]:[],[d.OPBNBTEST]:["https://opbnb-testnet-rpc.bnbchain.org/"],[d.OPBNB]:["https://opbnb-mainnet-rpc.bnbchain.org"],[d.ScrollSepoliaTestnet]:["https://sepolia-rpc.scroll.io/"]},v={[d.Mainnet]:["https://bscscan.com"],[d.Testnet]:["https://testnet.bscscan.com"],[d.Arbitrum]:["https://arbiscan.io"],[d.ArbitrumRinkeby]:["https://testnet.arbiscan.io"],[d.ThunderCore]:["https://viewblock.io/thundercore"],[d.ThunderCoreTestnet]:["https://explorer-testnet.thundercore.com"],[d.FindoraTest]:["https://gsc-testnet-blockscout.prod.findora.org/"],[d.LineaTestnet]:["https://explorer.goerli.linea.build"],[d.POLYGON_MUMBAI]:["https://mumbai.polygonscan.com/"],[d.LineaMainnet]:[" https://lineascan.build"],[d.ArbitrumGoerli]:["https://goerli.arbiscan.io/"],[d.POLYGON_ZKEVM]:["https://testnet-zkevm.polygonscan.com"],[d.OPBNBTEST]:["https://opbnb-testnet.bscscan.com"],[d.OPBNB]:["https://opbnbscan.com/"],[d.ScrollSepoliaTestnet]:["https://sepolia-blockscout.scroll.io"],[d.ScrollAlphaTestnet]:["https://alpha-blockscout.scroll.io"]},y=(d.Mainnet,d.Testnet,d.Arbitrum,d.ArbitrumRinkeby,d.ThunderCore,d.ThunderCoreTestnet,d.FindoraTest,d.OPBNBTEST,d.Mainnet,d.Testnet,d.Arbitrum,d.ArbitrumRinkeby,d.ThunderCore,d.ThunderCoreTestnet,d.FindoraTest,{[d.Mainnet]:"BSC Mainnet",[d.Testnet]:"BSC Testnet",[d.Arbitrum]:"Arbitrum One",[d.ArbitrumRinkeby]:"Arbitrum Rinkeby",[d.ThunderCore]:"ThunderCore Mainnet",[d.ThunderCoreTestnet]:"ThunderCore Testnet",[d.FindoraTest]:"GSC Testnet",[d.LineaTestnet]:"Linea Testnet",[d.LineaMainnet]:"Linea Mainnet",[d.POLYGON_MUMBAI]:"Polygon Mumbai",[d.ArbitrumGoerli]:"Arbitrum Goerli Testnet",[d.POLYGON_ZKEVM]:"Polygon zkEVM Testnet",[d.OPBNB]:"opBNB Mainnet",[d.OPBNBTEST]:"opBNB testnet",[d.ScrollSepoliaTestnet]:"Scroll Sepolia Testnet",[d.ScrollAlphaTestnet]:"Scroll Alpha Testnet"}),b={[d.Mainnet]:"bsc",[d.Testnet]:"bsc-testnet",[d.Arbitrum]:"arbitrum",[d.ArbitrumRinkeby]:"arbitrum-rinkeby",[d.ThunderCore]:"thundercore",[d.ThunderCoreTestnet]:"thundercore-testnet",[d.FindoraTest]:"gsc-testnet",[d.LineaTestnet]:"linea-testnet",[d.LineaMainnet]:"linea",[d.POLYGON_MUMBAI]:"maticmum",[d.ArbitrumGoerli]:"arbitrum-goerli",[d.POLYGON_ZKEVM]:"polygon_zkEVM_testnet",[d.ScrollAlphaTestnet]:"Scroll Alpha Testnet",[d.OPBNBTEST]:"opBNB testnet",[d.OPBNB]:"opBNB Mainnet",[d.ScrollSepoliaTestnet]:"Scroll Sepolia Testnet"},w={[d.Mainnet]:!1,[d.Testnet]:!0,[d.Arbitrum]:!1,[d.ArbitrumRinkeby]:!0,[d.ThunderCore]:!1,[d.ThunderCoreTestnet]:!0,[d.FindoraTest]:!0,[d.LineaTestnet]:!0,[d.LineaMainnet]:!1,[d.POLYGON_MUMBAI]:!0,[d.POLYGON_ZKEVM]:!0,[d.OPBNB]:!1,[d.ArbitrumGoerli]:!0,[d.ScrollSepoliaTestnet]:!0,[d.ScrollAlphaTestnet]:!0,[d.OPBNBTEST]:!0},_={[d.Mainnet]:"/img/bsc.png",[d.Testnet]:"/img/bsc.png",[d.Arbitrum]:"/img/arbitrum.png",[d.ArbitrumRinkeby]:"/img/arbitrum.png",[d.ThunderCore]:"/img/thunderCore.svg",[d.ThunderCoreTestnet]:"/img/thunderCore.svg",[d.FindoraTest]:"/img/gsc.svg",[d.LineaTestnet]:"/img/linea.svg",[d.LineaMainnet]:"/img/linea_logo.svg",[d.POLYGON_MUMBAI]:"/img/matic-token-icon.svg",[d.ArbitrumGoerli]:"/img/arbitrum.png",[d.POLYGON_ZKEVM]:"/img/matic-token-icon.svg",[d.OPBNBTEST]:"/img/bsc.png",[d.OPBNB]:"/img/bsc.png",[d.ScrollSepoliaTestnet]:"/img/scroll.svg",[d.ScrollAlphaTestnet]:"/img/scroll.svg"},E={[d.Mainnet]:"BNB",[d.Testnet]:"BNB",[d.Arbitrum]:"ETH",[d.ArbitrumRinkeby]:"ETH",[d.ThunderCore]:"TT",[d.ThunderCoreTestnet]:"TST",[d.FindoraTest]:"RPG",[d.LineaTestnet]:"ETH",[d.LineaMainnet]:"ETH",[d.POLYGON_MUMBAI]:"MATIC",[d.ArbitrumGoerli]:"ETH",[d.POLYGON_ZKEVM]:"ETH",[d.ScrollAlphaTestnet]:"ETH",[d.OPBNBTEST]:"BNB",[d.OPBNB]:"BNB",[d.ScrollSepoliaTestnet]:"ETH"},k={[d.Mainnet]:"/img/bnb.svg",[d.Testnet]:"/img/bnb.svg",[d.Arbitrum]:"/img/ethereum.png",[d.FindoraTest]:"/img/ethereum.png",[d.ArbitrumRinkeby]:"/img/ethereum.png",[d.ThunderCore]:"/img/thunderCore.svg",[d.ThunderCoreTestnet]:"/img/thunderCore.svg",[d.LineaTestnet]:"/img/ethereum.png",[d.LineaMainnet]:"/img/ethereum.png",[d.POLYGON_MUMBAI]:"/img/ethereum.png",[d.ArbitrumGoerli]:"/img/ethereum.png",[d.POLYGON_ZKEVM]:"/img/ethereum.png",[d.OPBNBTEST]:"/img/bnb.svg",[d.OPBNB]:"/img/bnb.svg",[d.ScrollSepoliaTestnet]:"/img/ethereum.png",[d.ScrollAlphaTestnet]:"/img/ethereum.png"},C="0xca11bde05977b3631167028862be2a173976ca11",M={[d.Mainnet]:{multicall:C},[d.Testnet]:{multicall:C},[d.ThunderCore]:{multicall:C},[d.ThunderCoreTestnet]:{multicall:C},[d.Arbitrum]:{multicall:C},[d.ArbitrumRinkeby]:{multicall:C},[d.FindoraTest]:{multicall:"0xA29b61435b42F87EBe4b8B76A19192fcEE3B45DD"},[d.LineaTestnet]:{multicall:C},[d.LineaMainnet]:{multicall:C},[d.POLYGON_MUMBAI]:{multicall:C},[d.ArbitrumGoerli]:{multicall:C},[d.POLYGON_ZKEVM]:{multicall:C},[d.OPBNBTEST]:{multicall:C},[d.OPBNB]:{multicall:C},[d.ScrollSepoliaTestnet]:{multicall:C},[d.ScrollAlphaTestnet]:{multicall:C}};let x;!function(e){e.Lobby="lobby",e.Card="card",e.Points="points",e.ZypherGameToken="ZypherGameToken",e.Reward="reward",e.Fee="ZkBingoFee"}(x||(x={}));const A=(e,t)=>{if(!e)throw Error("Invalid 'chainId' parameter '".concat(e,"'."));try{var r;const o=null==i||null===(r=i[e])||void 0===r?void 0:r.release;return t===x.Lobby?o.ZkBingoLobby:t===x.Card?o.ZkBingoCard:t===x.Points?o.ZkBingoPoints:t===x.ZypherGameToken?o.ZypherGameToken:t===x.Reward?o.Reward:t===x.Fee?o.ZkBingoFee:n.d}catch(r){throw Error("zkBingo Invalid 'chainId' parameter '".concat(e,"', name: ").concat(t))}},S=(e,t)=>{if(!e)throw Error("Invalid V1 'chainId' parameter '".concat(e,"'."));try{var r;const a=w[e]?"develop":"release",s=null==o||null===(r=o[e])||void 0===r?void 0:r[a];let u=n.d;if(t===x.Lobby)u=s.ZkBingoLobby;else if(t===x.Card)u=s.ZkBingoCard;else if(t===x.Points)u=s.ZkBingoPoints;else if(t===x.ZypherGameToken){var i;u=null!==(i=s.ZypherGameToken)&&void 0!==i?i:s.ZkBingoToken}else t===x.Reward?u=s.Reward:t===x.Fee&&(u=s.ZkBingoFee);return u||n.d}catch(r){throw Error("zkBingo V1 Invalid 'chainId' parameter '".concat(e,"', name: ").concat(t))}},O="develop"===u.O?{[d.ArbitrumGoerli]:"https://arb-goerli-graph.zypher.game/subgraphs/name/arb/bingo"}:{},P=d.ArbitrumGoerli},59888:(e,t,r)=>{"use strict";r(82932);var n=r(31929);r(33852);function i(e){return i="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},i(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,r)}return s(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),n=1;n-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function M(e,t,r){var n=C(e,t,Object);n.obj[n.k]=r}function x(e,t){var r=C(e,t),n=r.obj,i=r.k;if(n)return n[i]}function A(e,t,r){var n=x(e,r);return void 0!==n?n:x(t,r)}function S(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):S(e[n],t[n],r):e[n]=t[n]);return e}function O(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var P={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function N(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return P[e]})):e}var T="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,I=[" ",",","?","!",";"];function R(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 B(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,o=0;oo+a;)a++,u=i[s=n.slice(o,o+a).join(r)];if(void 0===u)return;if(t.endsWith(s)){if("string"==typeof u)return u;if(s&&"string"==typeof u[s])return u[s]}var l=n.slice(o+a).join(r);return l?j(u,l,r):void 0}i=i[n[o]]}return i}}var D=function(e){c(r,e);var t=L(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,r),n=t.call(this),T&&w.call(u(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return s(r,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=x(this.data,a);return s||!o||"string"!=typeof r?s:j(this.data&&this.data[e]&&this.data[e][t],r,i)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),M(this.data,a,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=x(this.data,a)||{};n?S(s,r,i):s=B(B({},s),r),M(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?B(B({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),r}(w),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}};function U(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 z(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return o(this,r),n=t.call(this),T&&w.call(u(n)),k(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,u(n)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=b.create("translator"),n}return s(r,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,r){t=t||"",r=r||"";var n=I.filter((function(e){return t.indexOf(e)<0&&r.indexOf(e)<0}));if(0===n.length)return!0;var i=new RegExp("(".concat(n.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(r);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}(e,r,n));if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};var u=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,n){var o=this;if("object"!==i(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),u=s.key,l=s.namespaces,c=l[l.length-1],f=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(d){var h=t.nsSeparator||this.options.nsSeparator;return c+h+u}return u}var p=this.resolve(e,t),m=p&&p.res,g=p&&p.usedKey||u,v=p&&p.exactUsedKey||u,y=Object.prototype.toString.apply(m),b=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(_&&m&&E&&b.indexOf(y)<0&&("string"!=typeof w||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,z(z({},t),{},{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var k="[object Array]"===y,C=k?[]:{},M=k?v:g;for(var x in m)if(Object.prototype.hasOwnProperty.call(m,x)){var A="".concat(M).concat(a).concat(x);C[x]=this.translate(A,z(z({},t),{joinArrays:!1,ns:l})),C[x]===A&&(C[x]=m[x])}m=C}}else if(_&&"string"==typeof w&&"[object Array]"===y)(m=m.join(w))&&(m=this.extendTranslation(m,e,t,n));else{var S=!1,O=!1,P=void 0!==t.count&&"string"!=typeof t.count,N=r.hasDefaultValue(t),T=P?this.pluralResolver.getSuffix(f,t.count,t):"",I=t["defaultValue".concat(T)]||t.defaultValue;!this.isValidLookup(m)&&N&&(S=!0,m=I),this.isValidLookup(m)||(O=!0,m=u);var R=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,B=R&&O?void 0:m,L=N&&I!==m&&this.options.updateMissing;if(O||S||L){if(this.logger.log(L?"updateKey":"missingKey",f,c,u,L?I:m),a){var j=this.resolve(u,z(z({},t),{},{keySeparator:!1}));j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var U=0;U1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;r=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(t)||(o=e,!V["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(V["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(r){if(!a.isValidLookup(t)){i=r;var o,u=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,l,r,e,s);else{var c;f&&(c=a.pluralResolver.getSuffix(r,s.count,s));var p="_zero";if(f&&(u.push(l+c),d&&u.push(l+p)),h){var m="".concat(l).concat(a.options.contextSeparator).concat(s.context);u.push(m),f&&(u.push(m+c),d&&u.push(m+p))}}for(;o=u.pop();)a.isValidLookup(t)||(n=o,t=a.getResource(r,e,o,s))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),r}(w);function G(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Z=function(){function e(t){o(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=b.create("languageUtils")}return s(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=G(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=G(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=G(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){if(0===e.indexOf(n))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isSupportedCode(e)?i.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),W=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],K={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},$=["v1","v2","v3"],Q={zero:0,one:1,two:2,few:3,many:4,other:5};function Y(){var e={};return W.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:K[t.fc]}}))})),e}var J=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=r,this.logger=b.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Y()}return s(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((function(e,t){return Q[e]-Q[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):n.numbers.map((function(n){return t.getSuffix(e,n,r)})):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!$.includes(this.options.compatibilityJSON)}}]),e}();function X(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 ee(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=b.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:N,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?O(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?O(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?O(t.nestingPrefix):t.nestingPrefixEscaped||O("$t("),this.nestingSuffix=t.nestingSuffix?O(t.nestingSuffix):t.nestingSuffixEscaped||O(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var i=A(t,u,e);return s.alwaysFormat?s.format(i,void 0,r,ee(ee(ee({},n),t),{},{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),l=o.join(s.formatSeparator).trim();return s.format(A(t,u,a),l,r,ee(ee(ee({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,d=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach((function(t){for(a=0;i=t.regex.exec(e);){var r=i[1].trim();if(void 0===(o=c(r)))if("function"==typeof f){var u=f(e,i,n);o="string"==typeof u?u:""}else if(n&&n.hasOwnProperty(r))o="";else{if(d){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),o=""}else"string"==typeof o||s.useRawValueToEscape||(o=E(o));var l=t.safeValue(o);if(e=e.replace(i[0],l),d?(t.regex.lastIndex+=l.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=ee({},o);function s(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0],i=(i=this.interpolate(i,a)).replace(/'/g,'"');try{a=JSON.parse(i),t&&(a=ee(ee({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var u=[],l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=c.shift(),u=c,l=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=E(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=u.reduce((function(e,t){return i.format(e,t,o.lng,ee(ee({},o),{},{interpolationkey:r[1].trim()}))}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function re(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 ne(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=b.create("formatter"),this.options=t,this.formats={number:function(e,t,r){return new Intl.NumberFormat(t,r).format(e)},currency:function(e,t,r){return new Intl.NumberFormat(t,ne(ne({},r),{},{style:"currency"})).format(e)},datetime:function(e,t,r){return new Intl.DateTimeFormat(t,ne({},r)).format(e)},relativetime:function(e,t,r){return new Intl.RelativeTimeFormat(t,ne({},r)).format(e,r.range||"day")},list:function(e,t,r){return new Intl.ListFormat(t,ne({},r)).format(e)}},this.init(t)}return s(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"format",value:function(e,t,r,n){var i=this;return t.split(this.formatSeparator).reduce((function(e,t){var o=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);"currency"===t&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach((function(e){if(e){var t=m(e.split(":")),n=t[0],i=t.slice(1).join(":");"false"===i.trim()&&(r[n.trim()]=!1),"true"===i.trim()&&(r[n.trim()]=!0),isNaN(i.trim())||(r[n.trim()]=parseInt(i.trim(),10)),r[n.trim()]||(r[n.trim()]=i.trim())}}))}return{formatName:t,formatOptions:r}}(t),a=o.formatName,s=o.formatOptions;if(i.formats[a]){var u=e;try{var l=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},c=l.locale||l.lng||n.locale||n.lng||r;u=i.formats[a](e,c,ne(ne(ne({},s),n),l))}catch(e){i.logger.warn(e)}return u}return i.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function oe(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 ae(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:{};return o(this,r),a=t.call(this),T&&w.call(u(a)),a.backend=e,a.store=n,a.services=i,a.languageUtils=i.languageUtils,a.options=s,a.logger=b.create("backendConnector"),a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(i,s.backend,s),a}return s(r,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],a=[],s=[],u=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),o.indexOf(s)<0&&o.push(s),u.indexOf(t)<0&&u.push(t)))})),n||s.push(e)})),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:o,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=n[0],o=n[1];t&&this.emit("failedLoading",i,o,t),r&&this.store.addResourceBundle(i,o,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){!function(e,t,r,n){var i=C(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],n&&(o[a]=o[a].concat(r)),n||o[a].push(r)}(r.loaded,[i],o),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(s,u){s&&u&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,a)}),o):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(i," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,ae(ae({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),r}(w);function le(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i(e[2])||"object"===i(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ce(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function fe(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 de(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(o(this,r),e=t.call(this),T&&w.call(u(e)),e.options=ce(n),e.services={},e.logger=b,e.modules={external:[]},me(u(e)),i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),f(e,u(e));setTimeout((function(){e.init(n,i)}),0)}return e}return s(r,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var n=le();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=de(de(de({},n),this.options),ce(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=de(de({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?b.init(i(this.modules.logger),this.options):b.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=ie);var a=new Z(this.options);this.store=new D(this.options.resources,this.options);var s=this.services;s.logger=b,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new J(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(s.formatter=i(o),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new te(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new ue(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var f=_(),d=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),f.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),f}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pe,n=r,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=_();return e||(e=this.languages),t||(t=this.options.ns),r||(r=pe),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=_();this.emit("languageChanging",e);var i=function(e){if(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t-1)&&r.store.hasLanguageSomeTranslations(n)){r.resolvedLanguage=n;break}}},o=function(o){e||o||!r.services.languageDetector||(o=[]);var a="string"==typeof o?o:r.services.languageUtils.getBestMatchFromCodes(o);a&&(r.language||i(a),r.translator.language||r.translator.changeLanguage(a),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(a)),r.loadResources(a,(function(e){!function(e,o){o?(i(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){var a;if("object"!==i(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),l=2;l1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(n,e)||(!this.services.backendConnector.backend||!(!a(n,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=_();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=_();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pe,i=de(de(de({},this.options),t),{isClone:!0}),o=new r(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.services=de({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new H(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ge(e,t)}));var ve=ge.createInstance();ve.createInstance=ge.createInstance;ve.createInstance,ve.init,ve.loadResources,ve.reloadResources,ve.use,ve.changeLanguage,ve.getFixedT,ve.t,ve.exists,ve.setDefaultNamespace,ve.hasLoadedNamespace,ve.loadNamespaces,ve.loadLanguages;const ye=ve;function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function we(e,t){for(var r=0;r0){var o=n.maxAge-0;if(isNaN(o))throw new Error("maxAge should be a Number");i+="; Max-Age="+Math.floor(o)}if(n.domain){if(!Me.test(n.domain))throw new TypeError("option domain is invalid");i+="; Domain="+n.domain}if(n.path){if(!Me.test(n.path))throw new TypeError("option path is invalid");i+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},Ae=function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*r*1e3)),n&&(i.domain=n),document.cookie=xe(e,encodeURIComponent(t),i)},Se=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n0)r[n].substring(0,i)===e.lookupQuerystring&&(t=r[n].substring(i+1))}return t}},Ne=null,Te=function(){if(null!==Ne)return Ne;try{Ne="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Ne=!1}return Ne},Ie={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&Te()){var r=window.localStorage.getItem(e.lookupLocalStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&Te()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Re=null,Be=function(){if(null!==Re)return Re;try{Re="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Re=!1}return Re},Le={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Be()){var r=window.sessionStorage.getItem(e.lookupSessionStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Be()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},je={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var r=0;r0?t:void 0}},De={name:"htmlTag",lookup:function(e){var t,r=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Fe={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof r[e.lookupFromPathIndex])return;t=r[e.lookupFromPathIndex].replace("/","")}else t=r[0].replace("/","")}return t}},Ue={name:"subdomain",lookup:function(e){var t;if("undefined"!=typeof window){var r=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);r instanceof Array&&(t="number"==typeof e.lookupFromSubdomainIndex?r[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):r[0].replace("http://","").replace("https://","").replace(".",""))}return t}};var ze=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};be(this,e),this.type="languageDetector",this.detectors={},this.init(t,r)}var t,r,n;return t=e,r=[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Ce(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Oe),this.addDetector(Pe),this.addDetector(Ie),this.addDetector(Le),this.addDetector(je),this.addDetector(De),this.addDetector(Fe),this.addDetector(Ue)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var r=[];return e.forEach((function(e){if(t.detectors[e]){var n=t.detectors[e].lookup(t.options);n&&"string"==typeof n&&(n=[n]),n&&(r=r.concat(n))}})),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var r=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){r.detectors[t]&&r.detectors[t].cacheUserLanguage(e,r.options)})))}}],r&&we(t.prototype,r),n&&we(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function qe(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};We=Ze(Ze({},We),e)}(e.options.react),function(e){e}(e)}};const $e={en_US:{translation:{Follow:"Follow"}},zh_CN:{translation:{Follow:"Follow"}}};function Qe(e,t){if(this.prefix=e||"","undefined"==typeof window)return console.warn("no find window");-1===t?this.driver=window.sessionStorage:(this.driver=window.localStorage,this.expire=t||0)}Qe.prototype={constructor:Qe,_key(e){return this.prefix+e},keys(){const e=Object.keys(this.driver);if(this.prefix){const t=this.prefix.length;return e.map((function(e){return e.substring(t)}))}return e},remove(e){this.driver.removeItem(this._key(e))},clear(){this.driver.clear()},set(e,t,r){const n={value:t};void 0===r&&(r=this.expire),r&&(n.expire=Date.now()+1e3*r),this.driver.setItem(this._key(e),JSON.stringify(n))},get(e){let t=this.driver.getItem(this._key(e));return t&&(t=JSON.parse(t),t.expire&&t.expire{let{label:t,setDialogOpen:r,children:n,classNames:i}=e;const o=(0,He.useCallback)((()=>{r(!1)}),[r]);return He.createElement("div",{className:Et()(Lt,i)},He.createElement("p",{className:jt},t),n||null,He.createElement("span",{onClick:o},He.createElement(Ct.Z,{name:"close"})))}));var Ft,Ut,zt;function qt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Vt=Rt.ZP.div(Ft||(Ft=qt(["\n text-align: center;\n padding: 50px;\n"]))),Ht=(0,Rt.ZP)(St.default)(Ut||(Ut=qt(["\n border-radius: 12px;\n background: #6673ff;\n height: 48px;\n border: 0px;\n\n color: #fff;\n text-align: center;\n font-family: Poppins;\n font-size: 16px;\n"]))),Gt=Rt.ZP.div(zt||(zt=qt(["\n color: #fff;\n text-align: center;\n font-family: Poppins;\n font-size: 14px;\n padding-top: 30px;\n"]))),Zt=(0,He.memo)((()=>{const[e,t]=(0,mt.FV)(Bt.Ie),r=(0,kt.d)(),n=(0,He.useCallback)((()=>{window.open("https://beta.zypher.game/","_blank")}),[]);return He.createElement(Mt.Z,{open:e,onCancel:()=>t(!1),footer:null,wrapClassName:Et()("customDialog"),destroyOnClose:!0,closable:!1,width:r?"100%":360,centered:!r},He.createElement(Dt,{label:"Switch Networks",setDialogOpen:t,classNames:r?"modalTitleInner":""}),He.createElement(Vt,null,He.createElement(It,{style:{color:"#6673FF",fontSize:"50px"}}),He.createElement(Gt,null,"Arbtrium One is currently only deployed in beta.")),He.createElement("div",{style:{padding:"0 20px 30px"}},He.createElement(Ht,{block:!0,onClick:n},"Go to beta Version")))}),At());var Wt=r(59314);const Kt=(0,mt.cn)({key:"siderCollapseState",default:!1,effects_UNSTABLE:[(0,Wt.Nh)("siderCollapseState")]}),$t=(0,mt.cn)({key:"defaultSelectedKeys",default:"",effects_UNSTABLE:[(0,Wt.Nh)("defaultSelectedKeys")]});r(54214);var Qt,Yt=r(12386),Jt=(r(54277),r(74048)),Xt=(r(47811),r(91633)),er=r(59619);const tr=(0,Rt.ZP)(Ct.Z)(Qt||(rr=["\n width: 30px;\n height: 44px;\n min-width: 30px !important;\n"],nr||(nr=rr.slice(0)),Qt=Object.freeze(Object.defineProperties(rr,{raw:{value:Object.freeze(nr)}}))));var rr,nr;const ir=e=>He.createElement("div",{className:Et()(e.className)},He.createElement("a",{href:"https://twitter.com/Zypher_Games",target:"_blank",rel:"noreferrer"},He.createElement("span",null,He.createElement(Ct.Z,{name:"twitter"}))),He.createElement("a",{href:"https://discord.com/invite/MKJZhS4p2T",target:"_blank",rel:"noreferrer"},He.createElement("span",null,He.createElement(Ct.Z,{name:"discord"}))),He.createElement("a",{href:"http://medium.com/@ZypherGames",target:"_blank",rel:"noreferrer"},He.createElement("span",null,He.createElement(Ct.Z,{name:"medium"}))),He.createElement("a",{href:"https://github.com/zypher-game",target:"_blank",rel:"noreferrer"},He.createElement("span",null,He.createElement(Ct.Z,{name:"github"}))),He.createElement("a",{href:"https://interesting-crop-c73.notion.site/ZypherGames-Basecamp-58f3fc6362dc473db187dcec0b63e74e",target:"_blank",rel:"noreferrer"},He.createElement("span",null,He.createElement(Ct.Z,{name:"gitbook"}))));var or=r(52223),ar=r(87888),sr=r(90677);const ur="sidebar_sidebar__-yi2Y",lr="sidebar_logo__-G6Lb",cr="sidebar_community__YkCLu",fr=(0,He.memo)((()=>He.createElement("div",null,He.createElement(Xt.Z,{src:sr,preview:!1}),He.createElement(Xt.Z,{src:or,preview:!1})))),dr=e=>{const t=(0,mt.sJ)(Kt),r=(0,mt.sJ)($t),n=(0,kt.d)(),i=(0,bt.s0)(),[o,a]=(0,He.useState)([]),s=(0,mt.Zl)(Kt),u=(0,mt.Zl)($t),l=(e=>{let{setPathname:t}=e;const r=(0,mt.Zl)(Kt),n=(0,bt.TH)(),i=(0,kt.d)(),{showV1ul:o}=(0,er.a)();return(0,He.useEffect)((()=>{const e=n.pathname.split("/")[1];switch(r(!!i),e){case"zBingo":return r(!0),t(["2"]);case"profile":return t(["3"]);case"gbBox":return t(["4"]);case"invitation":return t(["7"]);case"ranking":return t(["8"]);case"defense":return r(!0),t(["9"]);case"shop":return t(["5"]);default:t(["1"])}}),[n,i]),(0,He.useMemo)((()=>[{label:"Homepage",key:"1",icon:He.createElement(tr,{name:"home"}),link:"/",collapse:!1,disabled:!1,title:"Homepage"},{key:"999"},{label:"zBingo",key:"2",icon:He.createElement("img",{src:"/img/bingo.png",alt:"bingo",style:{width:i?"40px":"44px",height:i?"40px":"44px"}}),link:"/zBingo",collapse:!0,disabled:!1,title:"zBingo"},{label:"z2048",key:"10",icon:He.createElement("img",{src:"/img/z2048.png",alt:"z2048",style:{width:i?"40px":"44px",height:i?"40px":"44px"}}),link:"/z2048",collapse:!1,disabled:!0,title:"Coming Soon"},{label:"zAce",key:"6",icon:He.createElement("img",{src:"/img/poker.png",alt:"poker",style:{width:i?"40px":"44px",height:i?"40px":"44px"}}),link:"/zAce",collapse:!1,disabled:!0,title:"Coming Soon"},{key:"998"},{label:"Profile",key:"3",icon:He.createElement(tr,{name:"profile"}),link:"/profile",collapse:!1,disabled:!1,title:"Profile"},{label:"Invitation 🔥",key:"7",icon:He.createElement(tr,{name:"invitation"}),link:"/invitation",collapse:!1,disabled:!!o,title:"Invitation 🔥"},{key:"997"},{label:"Ranking",key:"8",icon:He.createElement(tr,{name:"ranking"}),link:"/ranking",collapse:!1,disabled:!0,title:"Ranking"},{label:"Shop",key:"5",icon:He.createElement(tr,{name:"shop"}),link:"/shop",collapse:!1,disabled:!0,title:"Coming Soon"}]),[i,o])})({setPathname:a}),c=(0,He.useCallback)((e=>{s(!!n||e.collapse),u(e.key),i(e.link)}),[n]);return He.createElement("div",{className:Et()(e.className,ur)},He.createElement(pt.rU,{to:"https://zypher.game/",target:"_black",className:Et()(lr)},He.createElement(Jt.default,{size:n?0:8},n||t?He.createElement(fr,null):He.createElement(He.Fragment,null,He.createElement(Xt.Z,{src:ar,preview:!1}),He.createElement(Xt.Z,{src:or,preview:!1})))),He.createElement("div",{className:ur,style:t?{padding:"0 0"}:{}},He.createElement(Yt.default,{theme:"dark",defaultSelectedKeys:[r],selectedKeys:o,inlineIndent:13,style:{backgroundColor:"#131313",display:"flex",flexDirection:"column",gap:"20px"}},l.map((e=>e.label?He.createElement(Yt.default.Item,{icon:e.icon,disabled:e.disabled,key:e.key,style:{fontSize:"16px",height:"44px",color:"#fff",marginTop:"4px",marginBottom:"4px",display:"flex",justifyContent:"start",alignItems:"center"},onClick:()=>c(e)},He.createElement("p",null,e.label)):He.createElement(Yt.default.Item,{className:"line",key:e.key,style:{marginTop:"0",marginBottom:"0"}}))))),!t&&He.createElement(ir,{className:cr}))},hr="header_header__EehUO",pr="header_left__n27dB",mr="header_right__5UxRT",gr="header_btn__DOTOH",vr="header_icon__kB9Ju",yr="header_close__myQo-";var br=r(96751),wr=r(47631);const _r="AccountInfoDialog_dialog__CKt4Z",Er="AccountInfoDialog_modalMain__a5A7h",kr=["src","alt"];function Cr(){return Cr=Object.assign||function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const xr=e=>{let{src:t,alt:r}=e,n=Mr(e,kr);const[i,o]=(0,He.useState)(!1);return t&&!i?He.createElement("img",Cr({},n,{alt:r,src:t,onError:()=>{o(!0)}})):He.createElement("div",n,He.createElement(Ct.Z,{name:"help"}))};var Ar=r(66847),Sr=r(61511),Or=r(88017);const Pr=()=>{const e=(0,mt.sJ)(Bt.V2);return(0,He.useMemo)((()=>(0,Or.lb)(e,2)),[e])},Nr=()=>{const e=(0,mt.sJ)(Bt.fy);return(0,He.useMemo)((()=>(0,Or.lb)(e,0)),[e])},Tr=()=>{const{setFn:e,closeChainModal:t}=(0,br.iC)(),r=(0,mt.Zl)(Bt.Ie);(0,He.useEffect)((()=>(e&&t&&e((e=>e!==wr.a_.Arbitrum||(r(!0),t(),!1))),()=>{e(void 0)})),[e,t])};var Ir,Rr=r(23697);const Br=Rt.ZP.div(Ir||(Ir=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n color: #fff;\n font-size: 16px;\n padding: 5px 15px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n i {\n padding: 0;\n margin: 0;\n margin-right: 10px;\n }\n img {\n height: 24px;\n }\n .img {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n p {\n white-space: nowrap;\n }\n }\n"]))),Lr=(0,He.memo)((e=>{let{className:t}=e;const{chainId:r}=(0,er.a)(),n=(0,kt.d)(),{openChainModal:i}=(0,br.iC)();return Tr(),r?He.createElement(Br,{className:t,onClick:i,style:{cursor:"pointer"}},He.createElement("div",{className:"img"},He.createElement("img",{src:wr.Tf[r],alt:wr.GK[r]}),He.createElement("p",null,wr.GK[r])),He.createElement(Rr.t,{isMobile:n})):null}),At()),jr={m_content:"MUserInfo_m_content__Y9t8A",border:"MUserInfo_border__2nDex",chain:"MUserInfo_chain__nK0tt",account:"MUserInfo_account__YXLDx",tit:"MUserInfo_tit__EeCiC",userInfoInner:"MUserInfo_userInfoInner__ML12r",item:"MUserInfo_item__KJcFd",fl:"MUserInfo_fl__aM402"};var Dr=r(57142);const Fr="PcUserInfo_pc_content__kW5ZF",Ur="PcUserInfo_box__vdtIK",zr="PcUserInfo_tit__x8VFO",qr="PcUserInfo_info__o8hJl",Vr="PcUserInfo_text__HJw2H",Hr="PcUserInfo_disconnect_btn__5Zxor",Gr=(0,He.memo)((e=>{var t;let{connectName:r,connectIcon:n,account:i,chainId:o,cancel:a}=e;const s=(0,br.aN)(n);return He.createElement("div",{className:Fr},He.createElement("div",{className:Ur},He.createElement("div",{className:zr},"Connected with ".concat(r)),He.createElement("div",{className:qr},n&&He.createElement("img",{src:s,alt:r}),He.createElement("div",{className:Vr},(0,Or.LM)(i)),He.createElement("span",{onClick:()=>(0,Dr.Z)(i)},He.createElement(Ct.Z,{name:"copy"})),wr.M6[o]&&He.createElement("a",{href:"".concat(null!==(t=wr.M6[o])&&void 0!==t?t:[0],"/address/").concat(i),target:"_blank",rel:"noreferrer"},He.createElement(Ct.Z,{name:"link"})))),He.createElement(Zr,{cancel:a}))}),At()),Zr=(0,He.memo)((e=>{let{cancel:t}=e;return He.createElement("p",{className:Hr,onClick:t},"Disconnect")}),At()),Wr=Gr,Kr=(0,He.memo)((e=>{let{account:t,chainId:r,cancel:n}=e;const i=Pr(),o=Nr(),a=(0,kt.d)(),s=(0,He.useMemo)((()=>[{balanceStr:o,logo:He.createElement(Sr.Z,{isMobile:a}),symbol:"Gold Points"},{balanceStr:i,logo:He.createElement(xr,{className:jr.img,src:wr.Xw[r]}),symbol:wr.F[r]}]),[]);return He.createElement("div",{className:jr.m_content},He.createElement(Lr,{className:Et()(jr.border,jr.chain)}),He.createElement("div",{className:jr.border},He.createElement("p",{className:jr.tit},"Your Wallet"),He.createElement("div",{className:jr.userInfoInner},He.createElement(Ar.Z,{className:jr.account,account:t,size:24,showAccount:!0}),He.createElement(Zr,{cancel:n})),He.createElement("div",{className:jr.balance},s.map((e=>He.createElement("div",{key:e.symbol,className:jr.item},He.createElement("div",{className:jr.fl},e.logo,He.createElement("p",null,e.symbol)),He.createElement("p",null,e.balanceStr)))))))}),At()),$r=(0,He.memo)((()=>{const[e,t]=(0,mt.FV)(Bt.hF),{account:r,chainId:n}=(0,er.a)(),i=(0,kt.d)(),{disconnect:o}=(0,gt.qL)(),a=(()=>{const e=(0,br.MM)();return(0,He.useMemo)((()=>{if(e){const t=e.filter((e=>e.ready&&e.recent));return null==t?void 0:t[0]}}),[e])})(),s=(0,He.useCallback)((()=>{o(),t(!1)}),[o]);return r&&n?He.createElement(He.Fragment,null,He.createElement(Mt.Z,{open:e,onCancel:()=>t(!1),footer:null,wrapClassName:Et()("customDialog","bottom",_r),destroyOnClose:!0,closable:!1,width:i?"100%":440,centered:!i,transitionName:i?"ant-slide-down":void 0},He.createElement(Dt,{label:"Your Wallet",setDialogOpen:t,classNames:i?"modalTitleInner":""}),He.createElement("div",{className:Er},i?He.createElement(Kr,{account:r,chainId:n,cancel:s}):He.createElement(Wr,{account:r,chainId:n,cancel:s,connectName:null==a?void 0:a.name,connectIcon:null==a?void 0:a.iconUrl})))):null}));const Qr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var Yr=function(e,t){return He.createElement(Nt.Z,(0,Ot.Z)((0,Ot.Z)({},e),{},{ref:t,icon:Qr}))};Yr.displayName="SyncOutlined";const Jr=He.forwardRef(Yr);var Xr=r(44431),en=r.n(Xr),tn=r(10271);const rn={balance:"balance_balance__3FhKL"};var nn=r(7085);const on=(0,He.memo)((e=>{let{className:t,loading:r,balanceStr:n,logo:i,preChild:o,onClick:a}=e;const s=(0,He.useCallback)((()=>{a&&a()}),[a]);return He.createElement("div",{className:Et()(t,rn.balance),onClick:s},o,r?He.createElement(nn.Z,null):He.createElement(He.Fragment,null,n,i))}),At()),an=on;var sn,un;function ln(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const cn=Rt.ZP.div(sn||(sn=ln(["\n color: #fff;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n &:hover {\n span {\n opacity: 1;\n }\n }\n span {\n opacity: 0.7;\n transition: opacity 0.3s;\n svg {\n width: ",";\n height: ",";\n }\n }\n"])),(e=>{let{isMobile:t}=e;return t?"16px":"24px"}),(e=>{let{isMobile:t}=e;return t?"16px":"24px"})),fn=(0,Rt.ZP)(Ct.Z)(un||(un=ln(["\n margin-right: ",";\n width: ",";\n"])),(e=>{let{isMobile:t}=e;return t?"4px":"10px"}),(e=>{let{isMobile:t}=e;return t?"20px":"24px"})),dn=(0,He.memo)((e=>{const{showPointsModal:t,isMobile:r}=e,{chainId:n,account:i,provider:o}=(0,er.a)(),[a,s]=(0,He.useState)(!1),u=(0,mt.Zl)(Bt.V2),l=(0,mt.Zl)(Bt.fy),c=(0,mt.sJ)(Bt.DM),f=(0,He.useCallback)((async()=>{if(!n||!i)return;s(!0);const e=await o.getBalance({address:i});u(new(en())(e.toString()).dividedBy(wr.$d).toNumber()),await d(),s(!1)}),[n,i,o]),d=(0,He.useCallback)((async()=>{if(n&&i&&o)try{const e=(0,wr.Cf)(n,wr.iJ.ZypherGameToken);if(e){const t=(0,tn.Z)(n,e),r=await t.read.balanceOf([i]);l(new(en())(r.toString()).dividedBy(wr.$d).toNumber())}else l(0)}catch(e){l(0)}}),[n,i,o]);(0,He.useEffect)((()=>{i&&n&&f()}),[i,n,c]);const h=Pr(),p=Nr();return He.createElement(He.Fragment,null,He.createElement(cn,{onClick:f,isMobile:r},He.createElement(Jr,null)),He.createElement(an,{onClick:t,logo:He.createElement(Sr.Z,{isMobile:r}),balanceStr:p,loading:a,className:e.className,preChild:He.createElement(fn,{name:"add",isMobile:r})}),!r&&He.createElement(an,{logo:He.createElement(xr,{className:rn.img,src:wr.Xw[n||97]}),balanceStr:h,loading:a,className:e.className}))}),At());var hn=r(20825);const pn="PointsRuleDialog_zindex__MLzFw",mn="PointsRuleDialog_dialogContent__l9+5Y",gn="PointsRuleDialog_cursor__EwruB",vn="PointsRuleDialog_dialogHeader__zJ19N",yn="PointsRuleDialog_dialogContainer__dpZci",bn="PointsRuleDialog_fontWhite__RLut7",wn="PointsRuleDialog_btnWrap__wzQde",_n="PointsRuleDialog_btn__RmlBc",En="PointsRuleDialog_flex__uNUB3",kn=(0,He.memo)((e=>{let{handleNext:t}=e;const[r,n]=(0,mt.FV)(Bt.VK);return He.createElement("div",{className:yn},He.createElement("p",null,"💡Discover Zypher's core with $Gold Points! Essential to our ecosystem, $GP bridges NFTs, in-game assets, and offers a unified gaming experience. Please note:"),He.createElement("p",null,He.createElement("em",null),He.createElement("i",null,"Once purchased, $GP is non-refundable."),He.createElement("br",null),He.createElement("em",null),He.createElement("i",null,"$GP cannot be transferred to another player's account.")),He.createElement("p",null,"📘 For more on $GP's utility, please refer to this section."),He.createElement("p",{className:En,onClick:()=>n(!r)},He.createElement(Ct.Z,{name:r?"checked":"check"})," Don't show this reminder anymore."),He.createElement(St.default,{className:_n,onClick:t},"Ok"))}),At()),Cn={dialog:"PointsDialog_dialog__EFebz",pointsIcon:"PointsDialog_pointsIcon__PwgJV",modalMain:"PointsDialog_modalMain__UTLuS",modalTitleInner:"PointsDialog_modalTitleInner__BCPwf",title:"PointsDialog_title__Gj3ga",balanceTitle:"PointsDialog_balanceTitle__1ypKL",loading:"PointsDialog_loading__kE2Ts",table:"PointsDialog_table__S9dPB",points:"PointsDialog_points__iramQ",points_1:"PointsDialog_points_1__dWeU3",points_img:"PointsDialog_points_img__fcNKR",points_6:"PointsDialog_points_6__imqjA",points_7:"PointsDialog_points_7__hjKXW",discount:"PointsDialog_discount__M6b6L",discount_img:"PointsDialog_discount_img__T4iSz",bottom:"PointsDialog_bottom__-Zykf"},Mn=(0,He.memo)((e=>{const[t,r]=(0,mt.FV)(Bt.RZ),n=(0,mt.sJ)(Bt.Qp),{chainId:i}=(0,er.a)(),o=Nr(),a=(0,kt.d)(),[s,u]=(0,He.useState)([]),l=(0,mt.Zl)(Bt.tZ),{isLoading:c,swapPointHandle:f}=(0,hn.yi)();return(0,He.useEffect)((()=>{i&&setTimeout((()=>{const e=(0,hn.Z8)(i);e&&u(e)}),800)}),[i]),He.createElement(Mt.Z,{open:t,onCancel:()=>r(!1),footer:null,wrapClassName:Et()("customDialog","bottom",Cn.dialog),width:a?"100%":604,destroyOnClose:!0,closable:!1,centered:!a,transitionName:a?"ant-slide-down":void 0},He.createElement(Dt,{label:"Recharge Points",setDialogOpen:r,classNames:Cn.modalTitleInner},He.createElement("p",{className:Cn.title,onClick:()=>{l(!0)}},"Join the zBingo Grand Opening Top-up Bonus Event (9/26 - 10/10)",He.createElement(Ct.Z,{name:"question",className:Cn.question}))),He.createElement("div",{className:Cn.modalMain},1===n?He.createElement(kn,{isLoading:c,handleNext:f}):c?He.createElement(xn,null):He.createElement(He.Fragment,null,He.createElement("div",{className:Cn.balanceTitle},He.createElement("p",null,"Balance: ",He.createElement("strong",null,o)),He.createElement(Sr.Z,{isMobile:a,classname:Cn.pointsIcon})),He.createElement(An,{pointsList:s,chainId:i,onClick:f}))))}),At()),xn=(0,He.memo)((()=>He.createElement("div",{className:Cn.loading},He.createElement(Ct.Z,{name:"loading02"}),He.createElement("p",null,"Confirming the Transaction"))),At()),An=(0,He.memo)((e=>{let{pointsList:t,chainId:r,onClick:n}=e;return He.createElement("div",{className:Cn.table},t.map(((e,t)=>He.createElement("div",{className:Et()(Cn.points,Cn["points_".concat(e.index)]),key:e.index,onClick:()=>n(t)},He.createElement("h3",null,e.pointAmountStr),He.createElement("img",{className:Cn.points_img,src:"/img/points/points_".concat(e.index,".png"),alt:"points"}),He.createElement("div",{className:Cn.bottom},He.createElement("p",null,e.priceStr),He.createElement(xr,{className:Cn.img,src:wr.Xw[r||97]})),e.discount&&He.createElement("div",{className:Cn.discount},He.createElement("img",{className:Cn.discount_img,src:"/img/points/discord.svg",alt:"points"}),He.createElement("p",null,e.discount,"% ",He.createElement("br",null),"OFF"))))))}),At()),Sn=Mn;var On=r(54549),Pn=r(74942);const Nn=()=>{const e=(0,mt.sJ)(Bt.tZ),t=(0,mt.Zl)(Bt.tZ),r=(0,He.useCallback)((()=>{t(!1)}),[]);return He.createElement(He.Fragment,null,He.createElement(Pn.t9,{isOpen:e,onDismiss:r,className:pn},He.createElement(Pn.cZ,{className:mn},He.createElement("div",{className:vn},He.createElement("h3",null,"Rules"),He.createElement("div",{className:gn,onClick:r},He.createElement(On.Z,null))),He.createElement("div",{className:yn},He.createElement("h4",null,"Top Up & Triumph with zBingo's Exclusive GP Bonus! 🎁"),He.createElement("p",null,"Celebrate the zBingo V1 Launch by maximizing your in-game holdings! For a limited time, every purchase of $GP you make entitles you to an added bonus. Here's how it works:"),He.createElement("p",null,He.createElement("em",null),He.createElement("i",null,"Purchase $GP during the event period."),He.createElement("br",null),He.createElement("em",null),He.createElement("i",null,"Secure your bonus ticket on our partner platforms, Galxe and Taskon."),He.createElement("br",null),He.createElement("em",null),He.createElement("i",null,"We will airdrop a percentage bonus of the $GP you've purchased to your account at the end of the campaign."),He.createElement("br",null),He.createElement("em",null)," ",He.createElement("i",null,"It's that simple! Enjoy the added benefits and supercharge your zBingo experience.")),He.createElement("p",null,"*Note: Exact bonus percentages and further specifics on the airdrop schedule can be found here"," ",He.createElement("a",{href:"https://medium.com/@ZypherGames/upcoming-announcement-44e69204adb1",target:"_blank",rel:"noreferrer"},"link")),He.createElement("h4",null,"Interpretation & Guidelines:"),He.createElement("p",null,"The project team reserves the right to interpret and determine the terms and conditions of the Daily Login Rewards event. If you have any questions please reach out to us on"," ",He.createElement("a",{href:"https://discord.com/invite/MKJZhS4p2T",target:"_blank",className:bn,rel:"noreferrer"},"Discord")," ","of hello@zypher.game.")),He.createElement("div",{className:wn},He.createElement(St.default,{className:_n,onClick:r},"Ok")))))};var Tn;const In=Rt.ZP.div(Tn||(Tn=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n display: flex;\n gap: 10px;\n align-items: center;\n .account {\n display: flex;\n flex-direction: row-reverse;\n gap: 9px;\n p {\n padding-left: 14px;\n }\n }\n"]))),Rn=(0,He.memo)((()=>{const e=(0,kt.d)(),t=(0,mt.Zl)(Bt.RZ),r=(0,He.useCallback)((()=>{t(!0)}),[t]),n=(0,mt.Zl)(Bt.hF),i=(0,He.useCallback)((()=>{n(!0)}),[n]),{account:o}=(0,er.a)();return He.createElement(He.Fragment,null,He.createElement(dn,{isMobile:e,showPointsModal:r}),He.createElement(In,{onClick:i},He.createElement(Ar.Z,{className:"account",account:o,size:e?26:36,showAccount:!e})),!e&&He.createElement(Lr,null),He.createElement($r,null),He.createElement(Sn,null),He.createElement(Nn,null))}),At()),Bn="rainbow_connectWallet_connectWallet__H4Zy+",Ln="rainbow_connectWallet_bgWallet__EEzx0",jn="rainbow_connectWallet_connect__PKgkV",Dn=(0,He.memo)((()=>{const{openChainModal:e}=(0,br.iC)(),t=(0,mt.Zl)(Bt.hF);return Tr(),He.createElement("div",{onClick:()=>{e&&(e(),t(!1))},className:jn},He.createElement("p",null,"Wrong network"))}),At()),Fn=(0,He.memo)((e=>{const{className:t}=e,r=(0,bt.TH)(),n=(0,He.useMemo)((()=>{const e=r.pathname.split("/");return"play"===e[1]||"zBingo"===e[1]||"defense"===e[1]}),[r]);return He.createElement("div",{className:Et()(Bn,n?Ln:"",t)},He.createElement(br.NL.Custom,null,(e=>{let{chain:t,openConnectModal:r,mounted:n}=e;return He.createElement(He.Fragment,null,n&&t?t&&(t.unsupported||t.id===wr.a_.Arbitrum)?He.createElement(Dn,null):He.createElement(Rn,null):He.createElement("div",{onClick:r,className:jn},He.createElement("p",null,"Connect Wallet")))})))}),At()),Un=Fn,zn=e=>{const t=(0,kt.d)(),r=(0,mt.Zl)(Kt),n=(0,mt.sJ)(Kt),{hideMenu:i=!1}=e;return He.createElement("header",{className:Et()(hr,e.className),style:{position:"sticky",top:0,zIndex:1,width:"100%"}},t&&n&&He.createElement("div",{className:pr},He.createElement(fr,null)),He.createElement("div",{className:mr},He.createElement(Un,{isMobile:t}),t&&!i?He.createElement(He.Fragment,null,n?He.createElement("div",{className:gr,onClick:()=>r(!1)},He.createElement(Ct.Z,{className:Et()(vr),name:"menu"})):He.createElement("div",{className:gr,onClick:()=>r(!0)},He.createElement(Ct.Z,{className:Et()(vr,yr),name:"close"}))):null),He.createElement(Zt,null))},{Sider:qn,Content:Vn}=wt.Z,Hn=e=>{const t=(0,bt.TH)(),[r,n]=(0,He.useState)([]),i=(0,mt.Zl)(Kt),o=(0,mt.sJ)(Kt),a=(0,kt.d)();return(0,He.useEffect)((()=>{const e=t.pathname.split("/");n(e)}),[t]),He.createElement(wt.Z,{className:Et()("lt-layout",r[1])},"play"!==r[2]||a?He.createElement(He.Fragment,null,He.createElement(qn,{collapsible:!0,collapsed:o,breakpoint:"md",collapsedWidth:a?"0":"90",width:"240px",trigger:null},He.createElement(dr,{className:"lt-sidebar"})),He.createElement(wt.Z,{className:"lt-layout-right"},He.createElement(zn,{className:"lt-header"}),He.createElement(Vn,{className:"lt-content"},He.createElement("div",{className:"lt-main"},e.children))),a&&!o&&He.createElement("div",{className:"lt-sidebar-layer",onClick:()=>i(!0)})):He.createElement("div",{className:"lt-content"},He.createElement("div",{className:"lt-main"},He.createElement(zn,{className:"lt-header",hideMenu:!0}),e.children)))},Gn=e=>((0,He.useEffect)((()=>{window.scrollTo(0,0)}),[window.location.href]),e.children);r(94125);var Zn=r(16318),Wn=r(37917),Kn=r(70064),$n=r(12322);var Qn=r(77599),Yn=r(95362);const Jn=(0,He.lazy)((()=>Promise.all([r.e(3677),r.e(3571)]).then(r.bind(r,4049)))),Xn=(0,He.lazy)((()=>r.e(6204).then(r.bind(r,96204)))),ei=(0,He.lazy)((()=>Promise.all([r.e(8854),r.e(6403),r.e(8444),r.e(3677),r.e(5409),r.e(8174),r.e(6170),r.e(5353),r.e(4667),r.e(6418)]).then(r.bind(r,91856)))),ti=(0,He.lazy)((()=>Promise.all([r.e(8854),r.e(6403),r.e(8444),r.e(3677),r.e(5409),r.e(5353),r.e(4667),r.e(8526)]).then(r.bind(r,99794)))),ri=(0,He.lazy)((()=>Promise.all([r.e(8854),r.e(6403),r.e(8174),r.e(6170),r.e(1815)]).then(r.bind(r,61815)))),ni=(0,He.lazy)((()=>Promise.all([r.e(6403),r.e(8444),r.e(5409),r.e(7910),r.e(4349),r.e(5379)]).then(r.bind(r,26175)))),ii=(0,He.lazy)((()=>Promise.all([r.e(8854),r.e(6403),r.e(8444),r.e(3677),r.e(5409),r.e(8174),r.e(6170),r.e(7910),r.e(7881),r.e(4349),r.e(5353),r.e(9240)]).then(r.bind(r,6640)))),oi=(0,He.lazy)((()=>Promise.all([r.e(8854),r.e(8444),r.e(8174),r.e(7910),r.e(9215),r.e(4349),r.e(9244)]).then(r.bind(r,95835)))),ai=()=>((0,Qn.wo)(),(()=>{const{chainId:e}=(0,$n.g)(),t=(0,Wn.C)((e=>e.user.error)),r=(0,Wn.C)((e=>e.user.success)),n=(0,Wn.T)();(0,He.useEffect)((()=>{e&&t&&t.message&&(Zn.default.destroy(),Zn.default.error({className:"customNotification failed",message:t.message,icon:He.createElement(Ct.Z,{name:"failed"}),duration:3,btn:null,closeIcon:null,top:75}),n((0,Kn.eq)({key:"error",value:void 0})))}),[e,t]),(0,He.useEffect)((()=>{e&&r&&r.message&&(Zn.default.destroy(),Zn.default.success({className:"customNotification success",message:r.message,icon:He.createElement(Ct.Z,{name:"success"}),duration:3,btn:null,closeIcon:null,top:75}),n((0,Kn.eq)({key:"success",value:void 0})))}),[e,r])})(),(()=>{const e=(0,mt.sJ)(Bt.LR),{openConnectModal:t}=(0,br.We)(),[r,n]=(0,He.useState)(!1);(0,He.useEffect)((()=>(n(!0),()=>{n(!1)})),[]),(0,He.useEffect)((()=>{r&&e&&t&&t()}),[r,e,t])})(),(0,Yn.k)(),He.createElement(Hn,null,He.createElement(Gn,null,He.createElement(He.Suspense,{fallback:He.createElement(He.Fragment,null)},He.createElement(bt.Z5,null,He.createElement(bt.AW,{path:"/",element:He.createElement(Jn,null)}),He.createElement(bt.AW,{path:"/zBingo",element:He.createElement(ii,null)}),He.createElement(bt.AW,{path:"/zBingo/play",element:He.createElement(ni,null)}),He.createElement(bt.AW,{path:"/zBingo/play/:id/gameRoom",element:He.createElement(oi,null)}),He.createElement(bt.AW,{path:"/profile",element:He.createElement(ei,null)}),He.createElement(bt.AW,{path:"/invitation",element:He.createElement(ri,null)}),He.createElement(bt.AW,{path:"/games/list",element:He.createElement(ti,null)}),null,He.createElement(bt.AW,{path:"*",element:He.createElement(Xn,null)}))))));var si=r(35840),ui=r(72595),li=r(83942);const ci=(0,si.oM)({name:"wallets",initialState:{connectedWallets:[],switchingChain:!1},reducers:{addConnectedWallet(e,t){let{payload:r}=t;e.connectedWallets.some((e=>(0,ht.wU)(r,e)))||(e.connectedWallets=[...e.connectedWallets,r])},startSwitchingChain(e,t){let{payload:r}=t;e.switchingChain=r},endSwitchingChain(e){e.switchingChain=!1}}}),{addConnectedWallet:fi,startSwitchingChain:di,endSwitchingChain:hi}=ci.actions,pi=ci.reducer,mi=["user","price","wallets"],gi="v0.01",vi=(0,si.xC)({reducer:{user:Kn.ZP,wallets:pi,price:li.Z},middleware:e=>e({thunk:!0}).concat((0,ui.a1)({states:mi,namespace:gi})),preloadedState:(0,ui.zD)({states:mi,namespace:gi})}),yi=He.createContext({});function bi(e){let{children:t}=e;const[r,n]=(0,He.useState)("dark"),i="dark"===r;return(0,He.useEffect)((()=>(function(e,t){const r=e.className.split(" "),n=r.findIndex((e=>"dark"===e)),i=r.findIndex((e=>"light"===e));"light"===t?r.splice(n,1):"dark"===t&&r.splice(i,1),r.push(t),e.className=Et()(r)}(document.getElementsByTagName("html")[0],r),()=>{})),[r]),He.createElement(yi.Provider,{value:{currentThemeName:r,changeTheme:e=>{localStorage.setItem("theme",e),n(e)},isCurrentThemeDark:i}},t)}var wi=r(72606),_i="#1A1B1F",Ei={blue:{accentColor:"#3898FF",accentColorForeground:"#FFF"},green:{accentColor:"#4BD166",accentColorForeground:_i},orange:{accentColor:"#FF983D",accentColorForeground:_i},pink:{accentColor:"#FF7AB8",accentColorForeground:_i},purple:{accentColor:"#7A70FF",accentColorForeground:"#FFF"},red:{accentColor:"#FF6257",accentColorForeground:"#FFF"}},ki=Ei.blue,Ci=({accentColor:e=ki.accentColor,accentColorForeground:t=ki.accentColorForeground,...r}={})=>({...(0,wi.w)(r),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(255, 255, 255, 0.04)",actionButtonBorderMobile:"rgba(255, 255, 255, 0.08)",actionButtonSecondaryBackground:"rgba(255, 255, 255, 0.08)",closeButton:"rgba(224, 232, 255, 0.6)",closeButtonBackground:"rgba(255, 255, 255, 0.08)",connectButtonBackground:_i,connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",connectButtonText:"#FFF",connectButtonTextError:"#FFF",connectionIndicator:"#65EDBC",connectionIndicatorBorder:"#2a443a",downloadBottomCardBackground:"linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",downloadTopCardBackground:"linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",error:"#FF494A",generalBorder:"rgba(255, 255, 255, 0.08)",generalBorderDim:"rgba(255, 255, 255, 0.04)",menuItemBackground:"rgba(224, 232, 255, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.5)",modalBackground:"#1A1B1F",modalBorder:"rgba(255, 255, 255, 0.08)",modalText:"#FFF",modalTextDim:"rgba(224, 232, 255, 0.3)",modalTextSecondary:"rgba(255, 255, 255, 0.6)",profileAction:"rgba(224, 232, 255, 0.1)",profileActionHover:"rgba(224, 232, 255, 0.2)",profileForeground:"rgba(224, 232, 255, 0.05)",selectedOptionBorder:"rgba(224, 232, 255, 0.1)",standby:"#FFD641",standbyBorder:"#5c5847"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.24)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});Ci.accentColors=Ei;const Mi=e=>{let{children:t}=e;const r=(0,He.useMemo)((()=>Ci({accentColor:"#6673FF",borderRadius:"large",fontStack:"system"})),[]);return He.createElement(br.pj,{chains:yt.p5,appInfo:wr.GV,theme:r},t)};(0,dt.render)(He.createElement(ht.zt,{store:vi},He.createElement(gt.eM,{config:yt.gb},He.createElement(Mi,null,He.createElement(n.default,{locale:ft},He.createElement(mt.Wh,null,He.createElement(pt.UT,null,He.createElement(bi,null,He.createElement(vt.u,null,He.createElement(ai,null))))))))),document.getElementById("root"))},79742:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=u(e),a=o[0],s=o[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),c=0,f=s>0?a-4:a;for(r=0;r>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;su?u: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},92882: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 u=e.slice(0,s),l=e.slice(s+1);if(l.length<6)return"Data too short";var c=a(u);if("string"==typeof c)return c;for(var f=[],d=0;d=l.length||f.push(p)}return 1!==c?"Invalid checksum for "+e:{prefix:u,words:f}}function u(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",u=0;u>5!=0)throw new Error("Non 5-bit word");i=o(i)^l,s+=t.charAt(l)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){s+=t.charAt(i>>5*(5-u)&31)}return s},toWordsUnsafe:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},44431:function(e,t,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,l="[BigNumber Error] ",c=l+"Number primitive has more than 15 significant digits: ",f=1e14,d=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=(u=i.length)<(l=o.length)?u:l,a=0;ao[a]^r?1:-1;return u==l?0:u>l^r?1:-1}function w(e,t,r,n){if(er||e!==u(e))throw Error(l+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function _(e){var t=e.c.length-1;return v(e.e/d)==t&&e.c[t]%2!=0}function E(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function k(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 tj?v.c=v.e=null:e.e=10;f/=10,l++);return void(l>j?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(".","")),(f=g.search(/e/i))>0?(l<0&&(l=f),l+=+g.slice(f+1),g=g.substring(0,f)):l<0&&(l=g.length)}else{if(w(t,2,q.length,"Base"),10==t&&V)return K(v=new H(e),T+v.e+1,I);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,H.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(c+e)}else v.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=q.slice(0,t),l=f=0,m=g.length;fl){l=m;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,f=-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(f=0;48===g.charCodeAt(f);f++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(f,++m)){if(m-=f,p&&H.DEBUG&&m>15&&(e>h||e!==u(e)))throw Error(c+v.s*e);if((l=l-f-1)>j)v.c=v.e=null;else if(l=B)?E(u,a):k(u,a,"0");else if(o=(e=K(new H(e),t,r)).e,s=(u=y(e.c)).length,1==n||2==n&&(t<=o||o<=R)){for(;ss){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function Z(e,t){for(var r,n=1,i=new H(e[0]);n=10;i/=10,n++);return(r=n+r*d-1)>j?e.c=e.e=null:r=10;l/=10,i++);if((o=t-i)<0)o+=d,a=t,m=(c=g[h=0])/v[i-a-1]%10|0;else if((h=s((o+1)/d))>=g.length){if(!n)break e;for(;g.length<=h;g.push(0));c=m=0,i=1,a=(o%=d)-d+1}else{for(c=l=g[h],i=1;l>=10;l/=10,i++);m=(a=(o%=d)-d+i)<0?0:c/v[i-a-1]%10|0}if(n=n||t<0||null!=g[h+1]||(a<0?c:c%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?c/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[(d-t%d)%d],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[d-o],g[h]=a>0?u(c/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]==f&&(g[0]=1));break}if(g[h]+=l,g[h]!=f)break;g[h--]=0,l=1}for(o=g.length;0===g[--o];g.pop());}e.e>j?e.c=e.e=null:e.e=B?E(t,r):k(t,r,"0"),e.s<0?"-"+t:t)}return H.clone=e,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.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),T=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),I=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-g,0,t),w(r[1],0,g,t),R=r[0],B=r[1]):(w(r,-g,g,t),R=-(B=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),L=r[0],j=r[1];else{if(w(r,-g,g,t),!r)throw Error(l+t+" cannot be zero: "+r);L=-(j=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 D=!r,Error(l+"crypto unavailable");D=r}else D=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),F=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,g,t),U=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(l+t+" not an object: "+r);z=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(l+t+" invalid: "+r);V="0123456789"==r.slice(0,10),q=r}}return{DECIMAL_PLACES:T,ROUNDING_MODE:I,EXPONENTIAL_AT:[R,B],RANGE:[L,j],CRYPTO:D,MODULO_MODE:F,POW_PRECISION:U,FORMAT:z,ALPHABET:q}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.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===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%d)<1&&(t+=d),String(n[0]).length==t){for(t=0;t=f||r!==u(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)},H.maximum=H.max=function(){return Z(arguments,P.lt)},H.minimum=H.min=function(){return Z(arguments,P.gt)},H.random=(o=9007199254740992,C=Math.random()*o&2097151?function(){return u(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,a=0,c=[],f=new H(N);if(null==e?e=T:w(e,0,g),i=s(e/d),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(c.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(l+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a=9e15?crypto.randomBytes(7).copy(t,a):(c.push(o%1e14),a+=7);a=i/7}if(!D)for(;a=10;o/=10,a++);ar-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 u,l,c,f,d,h,p,m,g=n.indexOf("."),v=T,b=I;for(g>=0&&(f=U,U=0,n=n.replace(".",""),h=(m=new H(i)).pow(n.length-g),U=f,m.c=t(k(y(h.c),h.e,"0"),10,o,e),m.e=m.c.length),c=f=(p=t(n,i,o,s?(u=q,e):(u=e,q))).length;0==p[--f];p.pop());if(!p[0])return u.charAt(0);if(g<0?--c:(h.c=p,h.e=c,h.s=a,p=(h=r(h,m,v,b,o)).c,d=h.r,c=h.e),g=p[l=c+v+1],f=o/2,d=d||l<0||null!=p[l+1],d=b<4?(null!=g||d)&&(0==b||b==(h.s<0?3:2)):g>f||g==f&&(4==b||d||6==b&&1&p[l-1]||b==(h.s<0?8:7)),l<1||!p[0])n=d?k(u.charAt(1),-v,u.charAt(0)):u.charAt(0);else{if(p.length=l,d)for(--o;++p[--l]>o;)p[l]=0,l||(++c,p=[1].concat(p));for(f=p.length;!p[--f];);for(g=0,n="";g<=f;n+=u.charAt(p[g++]));n=k(n,c,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,u=e.length,l=t%m,c=t/m|0;for(e=e.slice();u--;)s=((i=l*(o=e[u]%m)+(n=c*o+(a=e[u]/m|0)*l)%m*m+s)/r|0)+(n/m|0)+c*a,e[u]=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,c,h,p,m,g,y,b,w,_,E,k,C,M,x,A,S,O=n.s==i.s?1:-1,P=n.c,N=i.c;if(!(P&&P[0]&&N&&N[0]))return new H(n.s&&i.s&&(P?!N||P[0]!=N[0]:N)?P&&0==P[0]||!N?0*O:O/0:NaN);for(w=(b=new H(O)).c=[],O=o+(c=n.e-i.e)+1,s||(s=f,c=v(n.e/d)-v(i.e/d),O=O/d|0),h=0;N[h]==(P[h]||0);h++);if(N[h]>(P[h]||0)&&c--,O<0)w.push(1),p=!0;else{for(M=P.length,A=N.length,h=0,O+=2,(m=u(s/(N[0]+1)))>1&&(N=e(N,m,s),P=e(P,m,s),A=N.length,M=P.length),C=A,E=(_=P.slice(0,A)).length;E=s/2&&x++;do{if(m=0,(l=t(N,_,A,E))<0){if(k=_[0],A!=E&&(k=k*s+(_[1]||0)),(m=u(k/x))>1)for(m>=s&&(m=s-1),y=(g=e(N,m,s)).length,E=_.length;1==t(g,_,y,E);)m--,r(g,A=10;O/=10,h++);K(b,o+(b.e=h+c*d-1)+1,a,p)}else b.e=c,b.r=+p;return b}}(),M=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,A=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(O,"");if(S.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(M,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(x,"$1").replace(A,"0.$1")),t!=o))return new H(o,i);if(H.DEBUG)throw Error(l+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},P.absoluteValue=P.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},P.comparedTo=function(e,t){return b(this,new H(e,t))},P.decimalPlaces=P.dp=function(e,t){var r,n,i,o=this;if(null!=e)return w(e,0,g),null==t?t=I:w(t,0,8),K(new H(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-v(this.e/d))*d,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(e,t){return r(this,new H(e,t),T,I)},P.dividedToIntegerBy=P.idiv=function(e,t){return r(this,new H(e,t),0,1)},P.exponentiatedBy=P.pow=function(e,t){var r,n,i,o,a,c,f,h,p=this;if((e=new H(e)).c&&!e.isInteger())throw Error(l+"Exponent not an integer: "+$(e));if(null!=t&&(t=new H(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 H(Math.pow(+$(p),a?2-_(e):+$(e))),t?h.mod(t):h;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(n=!c&&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&&_(e)?-0:0,p.e>-1&&(o=1/o),new H(c?1/o:o);U&&(o=s(U/d+2))}for(a?(r=new H(.5),c&&(e.s=1),f=_(e)):f=(i=Math.abs(+$(e)))%2,h=new H(N);;){if(f){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=u(i/2)))break;f=i%2}else if(K(e=e.times(r),e.e+1,1),e.e>14)f=_(e);else{if(0===(i=+$(e)))break;f=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:(c&&(h=N.div(h)),t?h.mod(t):o?K(h,U,I,undefined):h)},P.integerValue=function(e){var t=new H(this);return null==e?e=I:w(e,0,8),K(t,t.e+1,e)},P.isEqualTo=P.eq=function(e,t){return 0===b(this,new H(e,t))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(e,t){return b(this,new H(e,t))>0},P.isGreaterThanOrEqualTo=P.gte=function(e,t){return 1===(t=b(this,new H(e,t)))||0===t},P.isInteger=function(){return!!this.c&&v(this.e/d)>this.c.length-2},P.isLessThan=P.lt=function(e,t){return b(this,new H(e,t))<0},P.isLessThanOrEqualTo=P.lte=function(e,t){return-1===(t=b(this,new H(e,t)))||0===t},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new H(e,t)).s,!s||!t)return new H(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/d,l=e.e/d,c=a.c,h=e.c;if(!u||!l){if(!c||!h)return c?(e.s=-t,e):new H(h?a:NaN);if(!c[0]||!h[0])return h[0]?(e.s=-t,e):new H(c[0]?a:3==I?-0:0)}if(u=v(u),l=v(l),c=c.slice(),s=u-l){for((o=s<0)?(s=-s,i=c):(l=u,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=c.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;c[r++]=0);for(t=f-1;n>s;){if(c[--n]=0;){for(r=0,p=k[i]%w,g=k[i]/w|0,o=i+(a=u);o>i;)r=((l=p*(l=E[--a]%w)+(s=g*l+(c=E[a]/w|0)*p)%w*w+y[o]+r)/b|0)+(s/w|0)+g*c,y[o--]=l%b;y[o]=r}return r?++n:y.splice(0,1),W(e,y,n)},P.negated=function(){var e=new H(this);return e.s=-e.s||null,e},P.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new H(e,t)).s,!i||!t)return new H(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/d,a=e.e/d,s=n.c,u=e.c;if(!o||!a){if(!s||!u)return new H(i/0);if(!s[0]||!u[0])return u[0]?e:new H(s[0]?n:0*i)}if(o=v(o),a=v(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/f|0,s[t]=f===s[t]?0:s[t]%f;return i&&(s=[i].concat(s),++a),W(e,s,a)},P.precision=P.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return w(e,1,g),null==t?t=I:w(t,0,8),K(new H(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*d+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},P.shiftedBy=function(e){return w(e,-9007199254740991,h),this.times("1e"+e)},P.squareRoot=P.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,u=a.s,l=a.e,c=T+4,f=new H("0.5");if(1!==u||!s||!s[0])return new H(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+$(a)))||u==1/0?(((t=y(s)).length+l)%2==0&&(t+="0"),u=Math.sqrt(+t),l=v((l+1)/2)-(l<0||l%2),n=new H(t=u==1/0?"5e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new H(u+""),n.c[0])for((u=(l=n.e)+c)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(a,o,c,1))),y(o.c).slice(0,u)===(t=y(n.c)).slice(0,u)){if(n.e0&&m>0){for(o=m%s||s,f=p.substr(0,o);o0&&(f+=c+p.slice(o)),h&&(f="-"+f)}n=d?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):f}return(r.prefix||"")+n+(r.suffix||"")},P.toFraction=function(e){var t,n,i,o,a,s,u,c,f,h,m,g,v=this,b=v.c;if(null!=e&&(!(u=new H(e)).isInteger()&&(u.c||1!==u.s)||u.lt(N)))throw Error(l+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+$(u));if(!b)return new H(v);for(t=new H(N),f=n=new H(N),i=c=new H(N),g=y(b),a=t.e=g.length-v.e-1,t.c[0]=p[(s=a%d)<0?d+s:s],e=!e||u.comparedTo(t)>0?a>0?t:f:u,s=j,j=1/0,u=new H(g),c.c[0]=0;h=r(u,t,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,f=c.plus(h.times(o=f)),c=o,t=u.minus(h.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),c=c.plus(o.times(f)),n=n.plus(o.times(i)),c.s=f.s=v.s,m=r(f,i,a*=2,I).minus(v).abs().comparedTo(r(c,n,a,I).minus(v).abs())<1?[f,i]:[c,n],j=s,m},P.toNumber=function(){return+$(this)},P.toPrecision=function(e,t){return null!=e&&w(e,1,g),G(this,e,t,2)},P.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<=R||o>=B?E(y(r.c),o):k(y(r.c),o,"0"):10===e&&V?t=k(y((r=K(new H(r),T+o+1,I)).c),r.e,"0"):(w(e,2,q.length,"Base"),t=n(k(y(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},P.valueOf=P.toJSON=function(){return $(this)},P._isBigNumber=!0,null!=t&&H.set(t),H}(),o.default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},13550: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&&void 0!==window.Buffer?window.Buffer:r(46601).Buffer}catch(e){}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 u(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=u(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,u=0,c=r;c1&&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 c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[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,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u: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?c[6-u.length]+u+r:u+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=f[e],h=d[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:c[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(void 0!==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,u="le"===t,l=new e(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.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,_=b>>>13,E=0|a[4],k=8191&E,C=E>>>13,M=0|a[5],x=8191&M,A=M>>>13,S=0|a[6],O=8191&S,P=S>>>13,N=0|a[7],T=8191&N,I=N>>>13,R=0|a[8],B=8191&R,L=R>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,q=U>>>13,V=0|s[1],H=8191&V,G=V>>>13,Z=0|s[2],W=8191&Z,K=Z>>>13,$=0|s[3],Q=8191&$,Y=$>>>13,J=0|s[4],X=8191&J,ee=J>>>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],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>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(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var ve=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var ye=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|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 Ee=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,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 ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,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,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ce=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(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)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,K))+Math.imul(F,W)|0,o=Math.imul(F,K),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(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)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Se=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Oe=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=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(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=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,ue)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ne=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ie=(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)+(Ie>>>26)|0,Ie&=67108863;var Re=(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)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=_e,u[6]=Ee,u[7]=ke,u[8]=Ce,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Se,u[13]=Oe,u[14]=Pe,u[15]=Ne,u[16]=Te,u[17]=Ie,u[18]=Re,0!==l&&(u[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!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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)-(u/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,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),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()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,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),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),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 k(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 _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(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 C(e){k.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 _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return v[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.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")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.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)},k.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},k.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)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.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),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=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],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new C(e)},i(C,k),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.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)},C.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)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},29931:(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(89509).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]^c[p>>>16&255]^f[m>>>8&255]^d[255&g]^t[v++],a=l[p>>>24]^c[m>>>16&255]^f[g>>>8&255]^d[255&h]^t[v++],s=l[m>>>24]^c[g>>>16&255]^f[h>>>8&255]^d[255&p]^t[v++],u=l[g>>>24]^c[h>>>16&255]^f[p>>>8&255]^d[255&m]^t[v++],h=o,p=a,m=s,g=u;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++],u=(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,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=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,u=0;u<256;++u){var l=s^s<<1^s<<2^s<<3^s<<4;l=l>>>8^255&l^99,r[a]=l,n[l]=a;var c=e[a],f=e[c],d=e[f],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*d^65537*f^257*c^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=c^e[e[e[d^c]]],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=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var l=[],c=0;c>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.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,u.INV_SUB_MIX,u.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},62422:(e,t,r)=>{var n=r(74497),i=r(89509).Buffer,o=r(71027),a=r(35717),s=r(83288),u=r(67295),l=r(20685);function c(e,t,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var c=this._cipher.encryptBlock(u);this._ghash=new s(c),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 u=8*o,c=i.alloc(8);c.writeUIntBE(u,0,8),n.update(c),e._finID=n.state;var f=i.from(e._finID);return l(f),f}(this,r,c),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(c,o),c.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},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(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(71494),i=r(66193),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)}},66193:(e,t,r)=>{var n=r(62422),i=r(89509).Buffer,o=r(45),a=r(25969),s=r(71027),u=r(74497),l=r(13048);function c(e,t,r){s.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function d(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 c(s.module,t,r)}r(35717)(c,s),c.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)},c.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},f.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 d(e,n.key,n.iv)},t.createDecipheriv=d},71494:(e,t,r)=>{var n=r(45),i=r(62422),o=r(89509).Buffer,a=r(25969),s=r(71027),u=r(74497),l=r(13048);function c(e,t,r){s.call(this),this._cache=new d,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(35717)(c,s),c.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 f=o.alloc(16,16);function d(){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 c(s.module,t,r)}c.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(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.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},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r{var n=r(89509).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},20685: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)}}},25292:(e,t,r)=>{var n=r(67295);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)}},86311:(e,t,r)=>{var n=r(89509).Buffer,i=r(67295);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}},21510:(e,t,r)=>{var n=r(89509).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(89509).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(67295),i=r(89509).Buffer,o=r(20685);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)}},45:(e,t,r)=>{var n={ECB:r(11084),CBC:r(25292),CFB:r(86311),CFB8:r(71964),CFB1:r(21510),OFB:r(18861),CTR:r(96009),GCM:r(96009)},i=r(44946);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},18861:(e,t,r)=>{var n=r(67295);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{var n=r(74497),i=r(89509).Buffer,o=r(71027);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(35717)(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},53614:(e,t,r)=>{var n=r(47667),i=r(44696),o=r(45),a=r(99715),s=r(13048);function u(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 u(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=u,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())}},47667:(e,t,r)=>{var n=r(71027),i=r(15251),o=r(35717),a=r(89509).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 u(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 u=e.iv;a.isBuffer(u)||(u=a.from(u)),this._des=i.create({key:o,iv:u,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=u,o(u,n),u.prototype._update=function(e){return a.from(this._des.update(e))},u.prototype._final=function(){return a.from(this._des.final())}},99715:(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}},23663:(e,t,r)=>{var n=r(43982),i=r(61798);function o(e){var t,r=e.modulus.byteLength();do{t=new n(i(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var r=function(e){var t=o(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),i=t.modulus.byteLength(),a=new n(e).mul(r.blinder).umod(t.modulus),s=a.toRed(n.mont(t.prime1)),u=a.toRed(n.mont(t.prime2)),l=t.coefficient,c=t.prime1,f=t.prime2,d=s.redPow(t.exponent1).fromRed(),h=u.redPow(t.exponent2).fromRed(),p=d.isub(h).imul(l).umod(c).imul(f);return h.iadd(p).imul(r.unblinder).umod(t.modulus).toArrayLike(Buffer,"be",i)}a.getr=o,e.exports=a},43982: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&&void 0!==window.Buffer?window.Buffer:r(71922).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=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 u(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),u=t;u=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=u(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,u=0,c=r;c1&&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")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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)||a!==this.length-1?d[6-u.length]+u+r:u+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=h[e],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?m+r:d[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,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u: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,_=b>>>13,E=0|a[4],k=8191&E,C=E>>>13,M=0|a[5],x=8191&M,A=M>>>13,S=0|a[6],O=8191&S,P=S>>>13,N=0|a[7],T=8191&N,I=N>>>13,R=0|a[8],B=8191&R,L=R>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,q=U>>>13,V=0|s[1],H=8191&V,G=V>>>13,Z=0|s[2],W=8191&Z,K=Z>>>13,$=0|s[3],Q=8191&$,Y=$>>>13,J=0|s[4],X=8191&J,ee=J>>>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],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>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(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var ve=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var ye=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|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 Ee=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,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 ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,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,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ce=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(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)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,K))+Math.imul(F,W)|0,o=Math.imul(F,K),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(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)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Se=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Oe=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=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(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=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,ue)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ne=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ie=(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)+(Ie>>>26)|0,Ie&=67108863;var Re=(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)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=_e,u[6]=Ee,u[7]=ke,u[8]=Ce,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Se,u[13]=Oe,u[14]=Pe,u[15]=Ne,u[16]=Te,u[17]=Ie,u[18]=Re,0!==l&&(u[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!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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)-(u/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,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),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()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,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),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),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 x(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 _(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(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 A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,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},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(E,_),E.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},E.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 E;else if("p224"===e)t=new k;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.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")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.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),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=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],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.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)},A.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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},56042:(e,t,r)=>{e.exports=r(75207)},64743:(e,t,r)=>{var n=r(89509).Buffer,i=r(23482),o=r(88473),a=r(35717),s=r(82957),u=r(47753),l=r(75207);function c(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 f(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 d(e){return new c(e)}function h(e){return new f(e)}Object.keys(l).forEach((function(e){l[e].id=n.from(l[e].id,"hex"),l[e.toLowerCase()]=l[e]})),a(c,o.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},c.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(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return u(t,i,e,this._signType,this._tag)},e.exports={Sign:d,Verify:h,createSign:d,createVerify:h}},82957:(e,t,r)=>{var n=r(89509).Buffer,i=r(58355),o=r(23663),a=r(36948).ec,s=r(58815),u=r(70980),l=r(1308);function c(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function d(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length{var n=r(89509).Buffer,i=r(58815),o=r(36948).ec,a=r(70980),s=r(1308);function u(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,c){var f=a(r);if("ec"===f.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,f)}if("dsa"===f.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,c=a.signature.decode(e,"der"),f=c.s,d=c.r;u(f,o),u(d,o);var h=i.mont(n),p=f.invm(o);return 0===s.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(l.toRed(h).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,t,f)}if("rsa"!==l&&"ecdsa/rsa"!==l)throw new Error("wrong public key type");t=n.concat([c,t]);for(var d=f.modulus.byteLength(),h=[1],p=0;t.length+h.length+2=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 u(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),u=t;u=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=u(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,u=0,c=r;c1&&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")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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)||a!==this.length-1?d[6-u.length]+u+r:u+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=h[e],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?m+r:d[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,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u: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,_=b>>>13,E=0|a[4],k=8191&E,C=E>>>13,M=0|a[5],x=8191&M,A=M>>>13,S=0|a[6],O=8191&S,P=S>>>13,N=0|a[7],T=8191&N,I=N>>>13,R=0|a[8],B=8191&R,L=R>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,q=U>>>13,V=0|s[1],H=8191&V,G=V>>>13,Z=0|s[2],W=8191&Z,K=Z>>>13,$=0|s[3],Q=8191&$,Y=$>>>13,J=0|s[4],X=8191&J,ee=J>>>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],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>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(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var ve=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var ye=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|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 Ee=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,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 ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,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,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ce=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(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)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,K))+Math.imul(F,W)|0,o=Math.imul(F,K),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(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)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Se=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Oe=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=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(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=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,ue)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ne=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ie=(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)+(Ie>>>26)|0,Ie&=67108863;var Re=(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)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=_e,u[6]=Ee,u[7]=ke,u[8]=Ce,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Se,u[13]=Oe,u[14]=Pe,u[15]=Ne,u[16]=Te,u[17]=Ie,u[18]=Re,0!==l&&(u[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!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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)-(u/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,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),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()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,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),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),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 x(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 _(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(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 A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,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},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(E,_),E.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},E.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 E;else if("p224"===e)t=new k;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.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")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.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),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=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],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.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)},A.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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},67295:e=>{e.exports=function(e,t){for(var r=Math.min(e.length,t.length),n=new Buffer(r),i=0;i{"use strict";const n=r(79742),i=r(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.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,u.prototype),t}function u(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 f(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(!u.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($(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(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($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(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 u.from(n,t,r);const i=function(e){if(u.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||Q(e.length)?s(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.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 c(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 f(e){return c(e),s(e<0?0:0|p(e))}function d(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(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(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 Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:Z(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 P(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(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),Q(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=u.from(t,n)),u.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,u=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,u/=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-u),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 M(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(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,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}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<=A)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.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&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if($(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.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),c=e.slice(t,r);for(let e=0;e>>=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 _(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function S(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,i,o){if(!u.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 R(e,t,r,n,i){q(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){q(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}u.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||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=J((function(e){V(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||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(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},u.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=J((function(e){V(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||T(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){I(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){I(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},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(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},u.prototype.writeBigUInt64LE=J((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=J((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);I(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},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);I(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},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(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},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(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},u.prototype.writeBigInt64LE=J((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=J((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.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 q(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){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function V(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 V(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 G=/[^+/0-9A-Za-z-_]/g;function Z(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 W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).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 $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const Y=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 J(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},71027:(e,t,r)=>{var n=r(89509).Buffer,i=r(42830).Transform,o=r(32553).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(35717)(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(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}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},94184:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t{"use strict";var n=r(11742),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var r,o,a,s,u,l,c=!1;t||(t={}),r=t.debug||!1;try{if(a=n(),s=document.createRange(),u=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===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(l),s.selectNodeContents(l),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(n){r&&console.error("unable to copy using execCommand: ",n),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(n){r&&console.error("unable to copy using clipboardData: ",n),r&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),l&&document.body.removeChild(l),a()}return c}},76393:(e,t,r)=>{var n=r(36948),i=r(13550);e.exports=function(e){return new a(e)};var o={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 a(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function s(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new Buffer(e);if(r&&n.length{"use strict";var n=r(35717),i=r(62318),o=r(79785),a=r(89072),s=r(71027);function u(e){s.call(this,"digest"),this._hash=e}n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.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 u(a(e))}},78028:(e,t,r)=>{var n=r(62318);e.exports=function(e){return(new n).update(e).digest()}},58355:(e,t,r)=>{"use strict";var n=r(35717),i=r(51031),o=r(71027),a=r(89509).Buffer,s=r(78028),u=r(79785),l=r(89072),c=a.alloc(128);function f(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 u:l(e)).update(t).digest():t.length{"use strict";var n=r(35717),i=r(89509).Buffer,o=r(71027),a=i.alloc(128),s=64;function u(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{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(61798),t.createHash=t.Hash=r(23482),t.createHmac=t.Hmac=r(58355);var n=r(56042),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(25632);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(53614);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 u=r(62607);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var l=r(64743);t.createSign=l.createSign,t.Sign=l.Sign,t.createVerify=l.createVerify,t.Verify=l.Verify,t.createECDH=r(76393);var c=r(7900);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var f=r(77963);t.randomFill=f.randomFill,t.randomFillSync=f.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}},27484:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",o="minute",a="hour",s="day",u="week",l="month",c="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:v,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+v(n,2,"0")+":"+v(i,2,"0")},m:function e(t,r){if(t.date()68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),r=60*t[1]+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r}(e)}],l=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},c=function(e,t){var r,n=o.meridiem;if(n){for(var i=1;i<=24;i+=1)if(e.indexOf(n(i,0,t))>-1){r=i>12;break}}else r=e===(t?"pm":"PM");return r},f={A:[i,function(e){this.afternoon=c(e,!1)}],a:[i,function(e){this.afternoon=c(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,s("seconds")],ss:[n,s("seconds")],m:[n,s("minutes")],mm:[n,s("minutes")],H:[n,s("hours")],h:[n,s("hours")],HH:[n,s("hours")],hh:[n,s("hours")],D:[n,s("day")],DD:[r,s("day")],Do:[i,function(e){var t=o.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],M:[n,s("month")],MM:[r,s("month")],MMM:[i,function(e){var t=l("months"),r=(l("monthsShort")||t.map((function(e){return e.substr(0,3)}))).indexOf(e)+1;if(r<1)throw new Error;this.month=r%12||r}],MMMM:[i,function(e){var t=l("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,s("year")],Z:u,ZZ:u};function d(r){var n,i;n=r,i=o&&o.formats;for(var a=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,n){var o=n&&n.toUpperCase();return r||i[n]||e[n]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,r){return t||r.slice(1)}))}))).match(t),s=a.length,u=0;u-1)return new Date(("X"===t?1e3:1)*e);var n=d(t)(e),i=n.year,o=n.month,a=n.day,s=n.hours,u=n.minutes,l=n.seconds,c=n.milliseconds,f=n.zone,h=new Date,p=a||(i||o?1:h.getDate()),m=i||h.getFullYear(),g=0;i&&!o||(g=o>0?o-1:h.getMonth());var v=s||0,y=u||0,b=l||0,w=c||0;return f?new Date(Date.UTC(m,g,p,v,y,b,w+60*f.offset*1e3)):r?new Date(Date.UTC(m,g,p,v,y,b,w)):new Date(m,g,p,v,y,b,w)}catch(e){return new Date("")}}(t,s,n),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),c&&t!=this.format(s)&&(this.$d=new Date("")),o={}}else if(s instanceof Array)for(var h=s.length,p=1;p<=h;p+=1){a[1]=s[p-1];var m=r.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}p===h&&(this.$d=new Date(""))}else i.call(this,e)}}}()},34425:function(e){e.exports=function(){"use strict";return function(e,t,r){r.isMoment=function(e){return r.isDayjs(e)}}}()},79212:function(e){e.exports=function(){"use strict";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}()},37412:function(e){e.exports=function(){"use strict";return function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}}}()},96036:function(e){e.exports=function(){"use strict";return function(e,t,r){var n=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},o=function(e,t,r,n,o){var a=e.name?e:e.$locale(),s=i(a[t]),u=i(a[r]),l=s||u.map((function(e){return e.substr(0,n)}));if(!o)return l;var c=a.weekStart;return l.map((function(e,t){return l[(t+(c||0))%7]}))},a=function(){return r.Ls[r.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,r){return t||r.slice(1)}))}(e.formats[t.toUpperCase()])},u=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):o(e,"months")},monthsShort:function(t){return t?t.format("MMM"):o(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):o(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):o(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):o(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};n.localeData=function(){return u.bind(this)()},r.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},r.months=function(){return o(a(),"months")},r.monthsShort=function(){return o(a(),"monthsShort","months",3)},r.weekdays=function(e){return o(a(),"weekdays",null,null,e)},r.weekdaysShort=function(e){return o(a(),"weekdaysShort","weekdays",3,e)},r.weekdaysMin=function(e){return o(a(),"weekdaysMin","weekdays",2,e)}}}()},56176:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,r,n){var i=r.prototype,o=i.format;n.en.formats=e,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var r=this.$locale().formats,n=function(t,r){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,i){var o=i&&i.toUpperCase();return n||r[i]||e[i]||r[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,r){return t||r.slice(1)}))}))}(t,void 0===r?{}:r);return o.call(this,n)}}}()},55183:function(e){e.exports=function(){"use strict";var e="week",t="year";return function(r,n,i){var o=n.prototype;o.week=function(r){if(void 0===r&&(r=null),null!==r)return this.add(7*(r-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var o=i(this).startOf(t).add(1,t).date(n),a=i(this).endOf(e);if(o.isBefore(a))return 1}var s=i(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),u=this.diff(s,e,!0);return u<0?i(this).startOf("week").week():Math.ceil(u)},o.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},172:function(e){e.exports=function(){"use strict";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),r=this.year();return 1===t&&11===e?r+1:0===e&&t>=52?r-1:r}}}()},6833:function(e){e.exports=function(){"use strict";return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,r=this.$W,n=(r{"use strict";t.utils=r(11278),t.Cipher=r(55756),t.DES=r(70778),t.CBC=r(39051),t.EDE=r(50651)},39051:(e,t,r)=>{"use strict";var n=r(79746),i=r(35717),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(79746);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(79746),i=r(35717),o=r(11278),a=r(55756);function s(){this.tmp=new Array(2),this.keys=null}function u(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(u,a),e.exports=u,u.create=function(e){return new u(e)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.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)}},u.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)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=d}o.rip(s,a,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,u=e.keys.length-2;u>=0;u-=2){var l=e.keys[u],c=e.keys[u+1];o.expand(a,e.tmp,0),l^=e.tmp[0],c^=e.tmp[1];var f=o.substitute(l,c),d=a;a=(s^o.permute(f))>>>0,s=d}o.rip(a,s,n,i)}},50651:(e,t,r)=>{"use strict";var n=r(79746),i=r(35717),o=r(55756),a=r(70778);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 u(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.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)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},11278:(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,u=0;u>>r[u]&1;for(u=s;u>>r[u]&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:()=>d});var n=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i{var n=r(43590),i=r(29799),o=r(57426);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new Buffer(i[e].prime,"hex"),r=new Buffer(i[e].gen,"hex");return new o(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,i,s){return Buffer.isBuffer(r)||void 0===a[r]?e(t,"binary",r,i):(r=r||"binary",s=s||"binary",i=i||new Buffer([2]),Buffer.isBuffer(i)||(i=new Buffer(i,s)),"number"==typeof t?new o(n(t,i),i,!0):(Buffer.isBuffer(t)||(t=new Buffer(t,r)),new o(t,i,!0)))}},57426:(e,t,r)=>{var n=r(13550),i=new(r(63047)),o=new n(24),a=new n(11),s=new n(10),u=new n(3),l=new n(7),c=r(43590),f=r(61798);function d(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this._pub=new n(e),this}function h(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this._priv=new n(e),this}e.exports=m;var p={};function m(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=h):this._primeCode=8}function g(e,t){var r=new Buffer(e.toArray());return t?r.toString(t):r}Object.defineProperty(m.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 p)return p[n];var f,d=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return d+=1,d+="02"===r||"05"===r?8:4,p[n]=d,d;switch(i.test(e.shrn(1))||(d+=2),r){case"02":e.mod(o).cmp(a)&&(d+=8);break;case"05":(f=e.mod(s)).cmp(u)&&f.cmp(l)&&(d+=8);break;default:d+=4}return p[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new n(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new Buffer(t.toArray()),i=this.getPrime();if(r.length{var n=r(61798);e.exports=y,y.simpleSieve=g,y.fermatTest=v;var i=r(13550),o=new i(24),a=new(r(63047)),s=new i(1),u=new i(2),l=new i(5),c=(new i(16),new i(8),new i(10)),f=new i(3),d=(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(u),t.cmp(u)){if(!t.cmp(l))for(;r.mod(c).cmp(f);)r.iadd(h)}else for(;r.mod(o).cmp(d);)r.iadd(h);if(g(p=r.shrn(1))&&g(r)&&v(p)&&v(r)&&a.test(p)&&a.test(r))return r}}},65987:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i={},o={};o[r]=0;var a,s,u,l,c,f,d,h=t.PriorityQueue.make();for(h.push(r,0);!h.empty();)for(u in s=(a=h.pop()).value,l=a.cost,c=e[s]||{})c.hasOwnProperty(u)&&(f=l+c[u],d=o[u],(void 0===o[u]||d>f)&&(o[u]=f,h.push(u,f),i[u]=s));if(void 0!==n&&void 0===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},36948:(e,t,r)=>{"use strict";var n=t;n.version=r(18597).i8,n.utils=r(80953),n.rand=r(29931),n.curve=r(88254),n.curves=r(45427),n.ec=r(57954),n.eddsa=r(65980)},4918:(e,t,r)=>{"use strict";var n=r(13550),i=r(80953),o=i.getNAF,a=i.getJSF,s=i.assert;function u(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=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;c--)u=(u<<1)+n[c];l.push(u)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;l--){for(var c=0;l>=0&&0===a[l];l--)c++;if(l>=0&&c++,u=u.dblp(c),l<0)break;var f=a[l];s(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var s,u,l,c=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0;for(s=0;s=1;s-=2){var m=s-1,g=s;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=a(r[m],r[g]);for(h=Math.max(b[0].length,h),d[m]=new Array(h),d[g]=new Array(h),u=0;u=0;s--){for(var C=0;s>=0;){var M=!0;for(u=0;u=0&&C++,E=E.dblp(C),s<0)break;for(u=0;u0?l=f[u][x-1>>1]:x<0&&(l=f[u][-x-1>>1].neg()),E="affine"===l.type?E.mixedAdd(l):E.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(80953),i=r(13550),o=r(35717),a=r(4918),s=n.assert;function u(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(u,a),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.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 u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.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)},u.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),u.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},u.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),u=i.redMul(a),l=o.redMul(s),c=i.redMul(s),f=a.redMul(o);return this.curve.point(u,l,f,c)},l.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var l=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(l.redSub(this.curve.two)),t=l.redMul(n.redSub(u)),r=l.redSqr().redSub(l).redSub(l)):(i=this.z.redSqr(),o=l.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=l.redMul(n.redSub(u)),r=l.redMul(o))}else n=s.redAdd(u),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(u)),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),u=r.redAdd(t),l=o.redMul(a),c=s.redMul(u),f=o.redMul(u),d=a.redMul(s);return this.curve.point(l,c,d,f)},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),u=i.redSub(s),l=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),f=n.redMul(u).redMul(c);return this.curve.twisted?(t=n.redMul(l).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(l)):(t=n.redMul(l).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(l)),this.curve.point(f,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},88254:(e,t,r)=>{"use strict";var n=t;n.base=r(4918),n.short=r(6673),n.mont=r(22881),n.edwards=r(31138)},22881:(e,t,r)=>{"use strict";var n=r(13550),i=r(35717),o=r(4918),a=r(80953);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 u(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(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.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)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.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()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.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},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(e,t,r)=>{"use strict";var n=r(80953),i=r(13550),o=r(35717),a=r(4918),s=n.assert;function u(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 c(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(u,a),e.exports=u,u.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)}}},u.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()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,l,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),v=new i(1),y=0;0!==d.cmpn(0);){var b=h.div(d);l=h.sub(b.mul(d)),c=g.sub(b.mul(p));var w=v.sub(b.mul(m));if(!n&&l.cmp(f)<0)t=u.neg(),r=p,n=l.neg(),o=c;else if(n&&2==++y)break;u=l,h=d,d=l,g=p,p=c,v=m,m=w}a=l.neg(),s=c;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=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,b:s}]},u.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),u=i.mul(r.b),l=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(l).neg()}},u.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)},u.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)},u.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(c,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.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)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.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),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),f=n.redMul(l),d=u.redSqr().redIAdd(c).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},c.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 u=a.redSqr(),l=u.redMul(a),c=r.redMul(u),f=s.redSqr().redIAdd(l).redISub(c).redISub(c),d=s.redMul(c.redISub(f)).redISub(i.redMul(l)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},c.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}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},45427:(e,t,r)=>{"use strict";var n,i=t,o=r(33715),a=r(88254),s=r(80953).assert;function u(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 u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,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(91037)}catch(e){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]})},57954:(e,t,r)=>{"use strict";var n=r(13550),i=r(2156),o=r(80953),a=r(45427),s=r(29931),u=o.assert,l=r(31251),c=r(90611);function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(u(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=f,f.prototype.keyPair=function(e){return new l(this,e)},f.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},f.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)}},f.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},f.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),u=e.toArray("be",a),l=new i({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new n(1)),d=0;;d++){var h=o.k?o.k(d):new n(l.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(f)>=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 c({r:g,s:v,recoveryParam:y})}}}}}},f.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new c(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,u=a.invm(this.n),l=u.mul(e).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new c(t,i);var o=this.n,a=new n(e),s=t.r,l=t.s,f=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),f):this.curve.pointFromX(s,f);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)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new c(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")}},31251:(e,t,r)=>{"use strict";var n=r(13550),i=r(80953).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""}},90611:(e,t,r)=>{"use strict";var n=r(13550),i=r(80953),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 u(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=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(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 c=u(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var f=e.slice(r.place,c+r.place);if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(l),this.s=new n(f),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];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,e)}},65980:(e,t,r)=>{"use strict";var n=r(33715),i=r(45427),o=r(80953),a=o.assert,s=o.parseBytes,u=r(79087),l=r(23622);function c(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(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=c,c.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()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},c.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)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=r(80953),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},23622:(e,t,r)=>{"use strict";var n=r(13550),i=r(80953),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function u(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(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},91037: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"]]}}},80953:(e,t,r)=>{"use strict";var n=t,i=r(13550),o=r(79746),a=r(34504);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)-u:u,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,u=e.andln(3)+i&3,l=t.andln(3)+o&3;3===u&&(u=-1),3===l&&(l=-1),a=0==(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==l?u:-u,r[0].push(a),s=0==(1&l)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?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")}},62378:e=>{"use strict";e.exports=function(e){for(var t=[],r=e.length,n=0;n=55296&&i<=56319&&r>n+1){var o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,n+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},39647:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="ethers/5.7.2"},5151: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.Wordlist=t.version=t.wordlists=t.utils=t.logger=t.errors=t.constants=t.FixedNumber=t.BigNumber=t.ContractFactory=t.Contract=t.BaseContract=t.providers=t.getDefaultProvider=t.VoidSigner=t.Wallet=t.Signer=void 0;var a=r(46599);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return a.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return a.Contract}}),Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return a.ContractFactory}});var s=r(80071);Object.defineProperty(t,"BigNumber",{enumerable:!0,get:function(){return s.BigNumber}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return s.FixedNumber}});var u=r(36026);Object.defineProperty(t,"Signer",{enumerable:!0,get:function(){return u.Signer}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return u.VoidSigner}});var l=r(85665);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return l.Wallet}});var c=o(r(3086));t.constants=c;var f=o(r(23803));t.providers=f;var d=r(23803);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return d.getDefaultProvider}});var h=r(76611);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return h.Wordlist}}),Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return h.wordlists}});var p=o(r(56371));t.utils=p;var m=r(52996);Object.defineProperty(t,"errors",{enumerable:!0,get:function(){return m.ErrorCode}});var g=r(39647);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return g.version}});var v=new m.Logger(g.version);t.logger=v},56371: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(88441);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(76455);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 u=o(r(4089));t.base64=u;var l=r(30710);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return l.Base58}});var c=r(7290);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return c.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return c.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return c.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return c.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return c.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return c.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return c.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return c.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return c.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return c.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return c.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return c.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return c.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return c.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return c.stripZeros}});var f=r(52255);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return f._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return f.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return f.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return f.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return f.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return f.namehash}});var d=r(11599);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return d.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return d.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return d.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return d.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return d.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return d.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return d.mnemonicToSeed}});var h=r(41718);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return h.getJsonWalletAddress}});var p=r(93073);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var m=r(52996);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return m.Logger}});var g=r(82879);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(73049);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(6005);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(49809);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(35748));t.RLP=w;var _=r(56189);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return _.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return _.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return _.SigningKey}});var E=r(46156);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return E.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return E.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return E.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return E._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return E.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return E.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return E.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return E.Utf8ErrorFuncs}});var k=r(91108);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return k.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return k.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return k.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return k.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return k.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return k.TransactionTypes}});var C=r(46474);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return C.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return C.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return C.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return C.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return C.parseUnits}});var M=r(85665);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return M.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return M.verifyTypedData}});var x=r(57064);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return x._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return x.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return x.poll}});var A=r(82879);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return A.SupportedAlgorithm}});var S=r(46156);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return S.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return S.Utf8ErrorReason}})},88441:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>re,ConstructorFragment:()=>E,ErrorFragment:()=>M,EventFragment:()=>y,FormatTypes:()=>h,Fragment:()=>v,FunctionFragment:()=>k,Indexed:()=>ce,Interface:()=>he,LogDescription:()=>se,ParamType:()=>m,TransactionDescription:()=>ue,checkResultErrors:()=>T,defaultAbiCoder:()=>ne});var n=r(91747),i=r(49809),o=r(52996);const a="abi/5.7.0",s=new o.Logger(a),u={};let l={calldata:!0,memory:!0,storage:!0},c={calldata:!0,memory:!0};function f(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)&&c[t])return!0;return(l[t]||"payable"===t)&&s.throwArgumentError("invalid modifier","name",t),!1}function d(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!==u&&s.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),d(this,t);let r=this.type.match(p);d(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(u,{name:e.name||null,type:x(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 r=0;rm.fromString(e,t)))}class v{constructor(e,t){e!==u&&s.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),d(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 k.fromObject(e);case"event":return y.fromObject(e);case"constructor":return E.fromObject(e);case"error":return M.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]?k.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?E.fromString(e.trim()):"error"===e.split(" ")[0]?M.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:S(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(m.fromObject):[],type:"event"};return new y(u,t)}static fromString(e){let t=e.match(O);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 _(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 E 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?E.fromString(e):E.fromObject(e)}static fromObject(e){if(E.isConstructorFragment(e))return e;"constructor"!==e.type&&s.throwArgumentError("invalid constructor object","value",e);let t=_(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 E(u,r)}static fromString(e){let t={type:"constructor"},r=(e=b(e,t)).match(O);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),E.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class k extends E{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?k.fromString(e):k.fromObject(e)}static fromObject(e){if(k.isFunctionFragment(e))return e;"function"!==e.type&&s.throwArgumentError("invalid function object","value",e);let t=_(e);const r={type:e.type,name:S(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 k(u,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(O);if(n||s.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&S(t.name),t.inputs=g(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(O);""==n[1].trim()&&""==n[3].trim()||s.throwArgumentError("unexpected tokens","value",e),t.outputs=g(n[2],!1)}else t.outputs=[];return k.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function C(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||s.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class M 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?M.fromString(e):M.fromObject(e)}static fromObject(e){if(M.isErrorFragment(e))return e;"error"!==e.type&&s.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:S(e.name),inputs:e.inputs?e.inputs.map(m.fromObject):[]};return C(new M(u,t))}static fromString(e){let t={type:"error"},r=e.match(O);return r||s.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&S(t.name),t.inputs=g(r[2],!1),C(M.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function x(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const A=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function S(e){return e&&e.match(A)||s.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const O=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");var P=r(7290);const N=new o.Logger(a);function T(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}class I{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){N.throwArgumentError(e,this.localName,t)}}class R{constructor(e){(0,i.defineReadOnly)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,P.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,P.concat)(e._data))}writeBytes(e){let t=(0,P.arrayify)(e);const r=t.length%this.wordSize;return r&&(t=(0,P.concat)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,P.arrayify)(n.O$.from(e));return t.length>this.wordSize&&N.throwError("value out-of-bounds",o.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,P.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 B{constructor(e,t,r,n){(0,i.defineReadOnly)(this,"_data",(0,P.arrayify)(e)),(0,i.defineReadOnly)(this,"wordSize",t||32),(0,i.defineReadOnly)(this,"_coerceFunc",r),(0,i.defineReadOnly)(this,"allowLoose",n),this._offset=0}get data(){return(0,P.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):B.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:N.throwError("data out-of-bounds",o.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new B(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 n.O$.from(this.readBytes(this.wordSize))}}var L=r(76455);class j extends I{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,L.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return(0,L.getAddress)((0,P.hexZeroPad)(e.readValue().toHexString(),20))}}class D extends I{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 F=new o.Logger(a);function U(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||F.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&F.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 F.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&F.throwArgumentError("types/value length mismatch","tuple",r);let i=new R(e.wordSize),a=new R(e.wordSize),s=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=a.length;e.encode(a,r);let n=i.writeUpdatableValue();s.push((e=>{n(e+t)}))}else e.encode(i,r)})),s.forEach((e=>{e(i.length)}));let u=e.appendWriter(i);return u+=e.appendWriter(a),u}function z(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),a=n.subReader(r.toNumber());try{i=t.decode(a)}catch(e){if(e.code===o.Logger.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===o.Logger.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=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 e=0;e{throw t}})}return Object.freeze(r)}class q extends I{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&&F.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e{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 U(e,this.coders,t)}decode(e){return e.coerce(this.name,z(e,this.coders))}}const X=new o.Logger(a),ee=new RegExp(/^bytes([0-9]*)$/),te=new RegExp(/^(u?int)([0-9]*)$/);class re{constructor(e){(0,i.defineReadOnly)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new j(e.name);case"bool":return new V(e.name);case"string":return new Y(e.name);case"bytes":return new G(e.name);case"array":return new q(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new J((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new W(e.name)}let t=e.type.match(te);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&X.throwArgumentError("invalid "+t[1]+" bit length","param",e),new $(r/8,"int"===t[1],e.name)}if(t=e.type.match(ee),t){let r=parseInt(t[1]);return(0===r||r>32)&&X.throwArgumentError("invalid bytes length","param",e),new Z(r,e.name)}return X.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new B(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new R(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(m.from(e))));return new J(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&X.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(m.from(e)))),n=new J(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const n=e.map((e=>this._getCoder(m.from(e))));return new J(n,"_").decode(this._getReader((0,P.arrayify)(t),r))}}const ne=new re;var ie=r(86056),oe=r(93073);const ae=new o.Logger(a);class se extends i.Description{}class ue extends i.Description{}class le extends i.Description{}class ce extends i.Description{static isIndexed(e){return!(!e||!e._isIndexed)}}const fe={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function de(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class he{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,(0,i.defineReadOnly)(this,"fragments",t.map((e=>v.from(e))).filter((e=>null!=e))),(0,i.defineReadOnly)(this,"_abiCoder",(0,i.getStatic)(new.target,"getAbiCoder")()),(0,i.defineReadOnly)(this,"functions",{}),(0,i.defineReadOnly)(this,"errors",{}),(0,i.defineReadOnly)(this,"events",{}),(0,i.defineReadOnly)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void ae.warn("duplicate definition - constructor"):void(0,i.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]?ae.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,i.defineReadOnly)(this,"deploy",E.from({payable:!1,type:"constructor"})),(0,i.defineReadOnly)(this,"_isInterface",!0)}format(e){e||(e=h.full),e===h.sighash&&ae.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===h.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return ne}static getAddress(e){return(0,L.getAddress)(e)}static getSighash(e){return(0,P.hexDataSlice)((0,ie.id)(e.format()),0,4)}static getEventTopic(e){return(0,ie.id)(e.format())}getFunction(e){if((0,P.isHexString)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];ae.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?ae.throwArgumentError("no matching function","name",t):r.length>1&&ae.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[k.fromString(e).format()];return t||ae.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,P.isHexString)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];ae.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?ae.throwArgumentError("no matching event","name",t):r.length>1&&ae.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[y.fromString(e).format()];return t||ae.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,P.isHexString)(e)){const t=(0,i.getStatic)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}ae.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?ae.throwArgumentError("no matching error","name",t):r.length>1&&ae.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[k.fromString(e).format()];return t||ae.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(e){throw t}}return(0,i.getStatic)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,i.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,P.arrayify)(t);return(0,P.hexlify)(r.slice(0,4))!==this.getSighash(e)&&ae.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,P.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,P.hexlify)((0,P.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=(0,P.arrayify)(t);return(0,P.hexlify)(r.slice(0,4))!==this.getSighash(e)&&ae.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,P.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,P.hexlify)((0,P.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,P.arrayify)(t),n=null,i="",a=null,s=null,u=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=(0,P.hexlify)(r.slice(0,4)),t=fe[e];if(t)a=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,u=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,u=t.format()}catch(e){}break}}return ae.throwError("call revert exception"+i,o.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,P.hexlify)(t),errorArgs:a,errorName:s,errorSignature:u,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,P.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&ae.throwError("too many arguments for "+e.format(),o.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const i=(e,t)=>"string"===e.type?(0,ie.id)(t):"bytes"===e.type?(0,oe.keccak256)((0,P.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=n.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,P.hexZeroPad)((0,P.hexlify)(t),32));for(t.forEach(((t,n)=>{let o=e.inputs[n];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?ae.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>i(o,e)))):r.push(i(o,t)):null!=t&&ae.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&&ae.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const a=t[o];if(e.indexed)if("string"===e.type)r.push((0,ie.id)(a));else if("bytes"===e.type)r.push((0,oe.keccak256)(a));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[a]))}else n.push(e),i.push(a)})),{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,P.isHexString)(r[0],32)&&r[0].toLowerCase()===t||ae.throwError("fragment/topic mismatch",o.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(m.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,P.concat)(r)):null,u=this._abiCoder.decode(i,t,!0),l=[],c=0,f=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)l[t]=new ce({_isIndexed:!0,hash:null});else if(a[t])l[t]=new ce({_isIndexed:!0,hash:s[f++]});else try{l[t]=s[f++]}catch(e){l[t]=e}else try{l[t]=u[c++]}catch(e){l[t]=e}if(e.name&&null==l[e.name]){const r=l[t];r instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw de(`property ${JSON.stringify(e.name)}`,r)}}):l[e.name]=r}}));for(let e=0;e{throw de(`index ${e}`,t)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ue({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:n.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new se({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,P.hexlify)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new le({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)}}},38193:(e,t,r)=>{"use strict";r.d(t,{Sg:()=>u,zt:()=>l});var n=r(91747),i=r(49809),o=r(52996);var a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const s=new o.Logger("abstract-provider/5.7.0");class u 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)}}},36026:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Signer:()=>l,VoidSigner:()=>c});var n=r(49809),i=r(52996);var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((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"],u=[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 t in e)-1===s.indexOf(t)&&a.throwArgumentError("invalid transaction key: "+t,"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(u.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 c 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 c(this.address,e)}}},76455:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getAddress:()=>h,getContractAddress:()=>g,getCreate2Address:()=>v,getIcapAddress:()=>m,isAddress:()=>p});var n=r(7290),i=r(91747),o=r(93073),a=r(35748);const s=new(r(52996).Logger)("address/5.7.0");function u(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 e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const i=(0,n.arrayify)((0,o.keccak256)(r));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const l={};for(let e=0;e<10;e++)l[String(e)]=String(e);for(let e=0;e<26;e++)l[String.fromCharCode(65+e)]=String(10+e);const c=Math.floor((f=9007199254740991,Math.log10?Math.log10(f):Math.log(f)/Math.LN10));var f;function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>l[e])).join("");for(;t.length>=c;){let e=t.substring(0,c);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=u(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)!==d(e)&&s.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=u("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function p(e){try{return h(e),!0}catch(e){}return!1}function m(e){let t=(0,i.t2)(h(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+d("XE00"+t)+t}function g(e){let t=null;try{t=h(e.from)}catch(t){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))}},30710:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseX:()=>o,Base32:()=>a,Base58:()=>s});var n=r(7290),i=r(49809);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(n%this.base),n=n/this.base|0}let i="";for(let e=0;0===t[e]&&e=0;--e)i+=this.alphabet[r[e]];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"},91747:(e,t,r)=>{"use strict";r.d(t,{Zm:()=>d,O$:()=>p,g$:()=>b,t2:()=>w});var n=r(61455),i=r.n(n),o=r(7290),a=r(52996),s=r(90099),u=i().BN;const l=new a.Logger(s.i),c={},f=9007199254740991;function d(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!==c&&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(c,m(e)):e.match(/^-?[0-9]+$/)?new p(c,m(new u(e))):l.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&y("underflow","BigNumber.from",e),(e>=f||e<=-f)&&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 u("-"+t.substring(3),16):new u(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 u(e,36).toString(16)}function w(e){return new u(e,16).toString(36)}},80071:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BigNumber:()=>n.O$,FixedFormat:()=>g,FixedNumber:()=>v,_base16To36:()=>n.t2,_base36To16:()=>n.g$,formatFixed:()=>p,parseFixed:()=>m});var n=r(91747),i=r(7290),o=r(52996),a=r(90099);const s=new o.Logger(a.i),u={},l=n.O$.from(0),c=n.O$.from(-1);function f(e,t,r,n){const i={fault:t,operation:r};return void 0!==n&&(i.value=n),s.throwError(e,o.Logger.errors.NUMERIC_FAULT,i)}let d="0";for(;d.length<256;)d+=d;function h(e){if("number"!=typeof e)try{e=n.O$.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+d.substring(0,e):s.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);const r=h(t),i=(e=n.O$.from(e)).lt(l);i&&(e=e.mul(c));let o=e.mod(r).toString();for(;o.length2&&s.throwArgumentError("too many decimal points","value",e);let a=o[0],u=o[1];for(a||(a="0"),u||(u="0");"0"===u[u.length-1];)u=u.substring(0,u.length-1);for(u.length>r.length-1&&f("fractional component exceeds decimals","underflow","parseFixed"),""===u&&(u="0");u.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(u,t,r,n)}}class v{constructor(e,t,r,n){e!==u&&s.throwError("cannot use FixedNumber constructor; use FixedNumber.from",o.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"+d.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=n.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,i.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,n.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),n=m(e,r.decimals);!r.signed&&n.lt(l)&&f("unsigned value cannot be negative","overflow","value",e);let o=null;r.signed?o=n.toTwos(r.width).toHexString():(o=n.toHexString(),o=(0,i.hexZeroPad)(o,r.width/8));const a=p(n,r.decimals);return new v(u,o,a,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=g.from(t);if((0,i.arrayify)(e).length>r.width/8)throw new Error("overflow");let o=n.O$.from(e);r.signed&&(o=o.fromTwos(r.width));const a=o.toTwos((r.signed?0:1)+r.width).toHexString(),s=p(o,r.decimals);return new v(u,a,s,r)}static from(e,t){if("string"==typeof e)return v.fromString(e,t);if((0,i.isBytes)(e))return v.fromBytes(e,t);try{return v.fromValue(e,0,t)}catch(e){if(e.code!==o.Logger.errors.INVALID_ARGUMENT)throw e}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")},7290:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arrayify:()=>l,concat:()=>c,hexConcat:()=>y,hexDataLength:()=>g,hexDataSlice:()=>v,hexStripZeros:()=>w,hexValue:()=>b,hexZeroPad:()=>_,hexlify:()=>m,isBytes:()=>u,isBytesLike:()=>a,isHexString:()=>h,joinSignature:()=>k,splitSignature:()=>E,stripZeros:()=>f,zeroPad:()=>d});const n=new(r(52996).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)||u(e)}function s(e){return"number"==typeof e&&e==e&&e%1==0}function u(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 f(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(u(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(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=d(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=_(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=_(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=_(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 k(e){return m(c([(e=E(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},84076:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});const n="0x0000000000000000000000000000000000000000"},46547:(e,t,r)=>{"use strict";r.d(t,{tL:()=>i,_Y:()=>o,fh:()=>a,Py:()=>s,Ce:()=>u,Bz:()=>l,$B:()=>c,PS:()=>f});var n=r(91747);const i=n.O$.from(-1),o=n.O$.from(0),a=n.O$.from(1),s=n.O$.from(2),u=n.O$.from("1000000000000000000"),l=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),c=n.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),f=n.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},17062:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},3086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AddressZero:()=>n.d,EtherSymbol:()=>a,HashZero:()=>o.R,MaxInt256:()=>i.PS,MaxUint256:()=>i.Bz,MinInt256:()=>i.$B,NegativeOne:()=>i.tL,One:()=>i.fh,Two:()=>i.Py,WeiPerEther:()=>i.Ce,Zero:()=>i._Y});var n=r(84076),i=r(46547),o=r(17062);const a="Ξ"},75240:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="hash/5.7.0"},86056:(e,t,r)=>{"use strict";r.d(t,{id:()=>o});var n=r(93073),i=r(16440);function o(e){return(0,n.keccak256)((0,i.Y0)(e))}},52255:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_TypedDataEncoder:()=>c.E,dnsEncode:()=>i.Kn,ensNormalize:()=>i.w3,hashMessage:()=>l,id:()=>n.id,isValidName:()=>i.r1,messagePrefix:()=>u,namehash:()=>i.VM});var n=r(86056),i=r(24176),o=r(7290),a=r(93073),s=r(16440);const u="Ethereum Signed Message:\n";function l(e){return"string"==typeof e&&(e=(0,s.Y0)(e)),(0,a.keccak256)((0,o.concat)([(0,s.Y0)(u),(0,s.Y0)(String(e.length)),e]))}var c=r(40888)},24176:(e,t,r)=>{"use strict";r.d(t,{Kn:()=>R,w3:()=>N,r1:()=>T,VM:()=>I});var n=r(7290),i=r(16440),o=r(93073),a=r(52996),s=r(75240);function u(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 e=1;e>--u&1}const f=Math.pow(2,31),d=f>>>1,h=d>>1,p=f-1;let m=0;for(let e=0;e<31;e++)m=m<<1|c();let g=[],v=0,y=f;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|c(),a=a<<1^d,s=(s^d)<<1|d|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 c(e){return 1&e?~e>>1:e>>1}function f(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 u(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(34901).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);function E(e){return(0,i.XL)(e)}function k(e){return e.filter((e=>65039!=e))}function C(e){for(let t of e.split(".")){let e=E(t);try{for(let t=e.lastIndexOf(95)-1;t>=0;t--)if(95!==e[t])throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&45===e[2]&&45===e[3])throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function M(e){return C(function(e,t){let r=E(e).reverse(),n=[];for(;r.length;){let e=x(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 C(function(e){return e.normalize("NFC")}(String.fromCodePoint(...n)))}(e,k))}function x(e,t){var r;let n,i,o=_,a=[],s=e.length;for(t&&(t.length=0);s;){let u=e[--s];if(o=null===(r=o.branches.find((e=>e.set.has(u))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=u;else if(o.check&&u===i)break;a.push(u),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 A=new a.Logger(s.i),S=new Uint8Array(32);function O(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function P(e){const t=(0,i.Y0)(M(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e=t.length)throw new Error("invalid ENS name; empty component");return r.push(O(t.slice(n))),r}function N(e){return P(e).map((e=>(0,i.ZN)(e))).join(".")}function T(e){try{return 0!==P(e).length}catch(e){}return!1}function I(e){"string"!=typeof e&&A.throwArgumentError("invalid ENS name; not a string","name",e);let t=S;const r=P(e);for(;r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)}function R(e){return(0,n.hexlify)((0,n.concat)(P(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"}S.fill(0)},40888:(e,t,r)=>{"use strict";r.d(t,{E:()=>x});var n=r(76455),i=r(91747),o=r(7290),a=r(93073),s=r(49809),u=r(52996),l=r(75240),c=r(86056),f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const d=new u.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"},_=["name","version","chainId","verifyingContract","salt"];function E(e){return function(t){return"string"!=typeof t&&d.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const k={name:E("name"),version:E("version"),chainId:function(e){try{return i.O$.from(e).toString()}catch(e){}return d.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}return d.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(e){}return d.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function C(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))&&d.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))&&d.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))&&d.throwArgumentError("invalid bytes width","type",e),function(t){return(0,o.arrayify)(t).length!==r&&d.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,c.id)(e)}}return null}function M(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class x{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 n in e){const i={};e[n].forEach((o=>{i[o.name]&&d.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",e),i[o.name]=!0;const a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===n&&d.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e);C(a)||(r[a]||d.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",e),r[a].push(n),t[n][a]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?d.throwArgumentError("missing primary type","types",e):i.length>1&&d.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]&&d.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 t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=M(t,e[t])+r.map((t=>M(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=C(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&&d.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,c.id)(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?(0,a.keccak256)(n):n}));return n.unshift(t),(0,o.hexConcat)(n)}}return d.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||d.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(C(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&&d.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,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{}):d.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new x(e)}static getPrimaryType(e){return x.from(e).primaryType}static hashStruct(e,t,r){return x.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=w[r];n||d.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>_.indexOf(e.name)-_.indexOf(t.name))),x.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,o.hexConcat)(["0x1901",x.hashDomain(e),x.from(t).hash(r)])}static hash(e,t,r){return(0,a.keccak256)(x.encode(e,t,r))}static resolveNames(e,t,r,n){return f(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=x.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){x.hashDomain(e);const n={},a=[];_.forEach((t=>{const r=e[t];null!=r&&(n[t]=k[t](r),a.push({name:t,type:w[t]}))}));const u=x.from(t),l=(0,s.shallowCopy)(t);return l.EIP712Domain?d.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):l.EIP712Domain=a,u.encode(r),{types:l,domain:n,primaryType:u.primaryType,message:u.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&&d.throwArgumentError("invalid string","value",t),t}return d.throwArgumentError("unsupported type","type",e)}))}}}},11599:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HDNode:()=>C,defaultPath:()=>k,entropyToMnemonic:()=>A,getAccountPath:()=>O,isValidMnemonic:()=>S,mnemonicToEntropy:()=>x,mnemonicToSeed:()=>M});var n=r(30710),i=r(7290),o=r(91747),a=r(16440),s=r(90682),u=r(49809),l=r(56189),c=r(78231),f=r(42661),d=r(91108),h=r(22442);const p=new(r(52996).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 C(E,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+="/"+(2147483647&e));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 t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=(0,i.arrayify)((0,c.Gy)(f.p.sha512,this.chainCode,r)),a=n.slice(0,32),s=n.slice(32);let u=null,d=null;if(this.privateKey)u=b(o.O$.from(a).add(this.privateKey).mod(m));else{d=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 C(E,u,d,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 e=0;e=v)throw new Error("invalid path index - "+n);r=r._derive(v+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=v)throw new Error("invalid path index - "+n);r=r._derive(e)}}}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,c.Gy)(f.p.sha512,g,r));return new C(E,b(n.slice(0,32)),null,"0x00000000",b(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=A(x(e,r=_(r)),r),C._fromSeed(M(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return C._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)),u=t.slice(45,78);switch((0,i.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new C(E,null,(0,i.hexlify)(u),o,s,a,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==u[0])break;return new C(E,(0,i.hexlify)(u.slice(1)),null,o,s,a,r,null)}return p.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function M(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 x(e,t){t=_(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 e=0;e>3]|=1<<7-o%8),o++}const a=32*r.length/3,s=y(r.length/3);if(((0,i.arrayify)((0,c.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 A(e,t){if(t=_(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 t=0;t8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const o=e.length/4,a=(0,i.arrayify)((0,c.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 S(e,t){try{return x(e,t),!0}catch(e){}return!1}function O(e){return("number"!=typeof e||e<0||e>=v||e%1)&&p.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}},41718:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptCrowdsale:()=>w,decryptJsonWallet:()=>U,decryptJsonWalletSync:()=>z,decryptKeystore:()=>D,decryptKeystoreSync:()=>j,encryptKeystore:()=>F,getJsonWalletAddress:()=>k,isCrowdsaleWallet:()=>_,isKeystoreWallet:()=>E});var n=r(78826),i=r.n(n),o=r(76455),a=r(7290),s=r(93073),u=r(90682),l=r(16440),c=r(49809),f=r(52996);const d="json-wallets/5.7.0";function h(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,a.arrayify)(e)}function p(e,t){for(e=String(e);e.length{const r=(t=(0,a.arrayify)(t)).slice(0,16),n=t.slice(16,32),o=t.slice(32,64),l=new(i().Counter)(y),m=new(i().ModeOfOperation.ctr)(r,l),k=(0,a.arrayify)(m.encrypt(u)),C=(0,s.keccak256)((0,a.concat)([n,k])),M={address:e.address.substring(2).toLowerCase(),id:v(b),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,a.hexlify)(y).substring(2)},ciphertext:(0,a.hexlify)(k).substring(2),kdf:"scrypt",kdfparams:{salt:(0,a.hexlify)(g).substring(2),n:w,dklen:32,p:E,r:_},mac:C.substring(2)}};if(c){const e=(0,A.O)(16),t=new(i().Counter)(e),r=new(i().ModeOfOperation.ctr)(o,t),n=(0,a.arrayify)(r.encrypt(c)),s=new Date,u=s.getUTCFullYear()+"-"+p(s.getUTCMonth()+1,2)+"-"+p(s.getUTCDate(),2)+"T"+p(s.getUTCHours(),2)+"-"+p(s.getUTCMinutes(),2)+"-"+p(s.getUTCSeconds(),2)+".0Z";M["x-ethers"]={client:h,gethFilename:"UTC--"+u+"--"+M.address,mnemonicCounter:(0,a.hexlify)(e).substring(2),mnemonicCiphertext:(0,a.hexlify)(n).substring(2),path:f,locale:d,version:"0.1"}}return JSON.stringify(M)}))}function U(e,t,r){if(_(e)){r&&r(0);const n=w(e,t);return r&&r(1),Promise.resolve(n)}return E(e)?D(e,t,r):Promise.reject(new Error("invalid JSON wallet"))}function z(e,t){if(_(e))return w(e,t);if(E(e))return j(e,t);throw new Error("invalid JSON wallet")}},93073:(e,t,r)=>{"use strict";r.r(t),r.d(t,{keccak256:()=>a});var n=r(91094),i=r.n(n),o=r(7290);function a(e){return"0x"+i().keccak_256((0,o.arrayify)(e))}},52996:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ErrorCode:()=>c,LogLevel:()=>l,Logger:()=>d});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 u=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,c;!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"}(c||(c={}));const f="0123456789abcdef";class d{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(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=f[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){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 c.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 c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.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,d.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"),u&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.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",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new d("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?a=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=c,d.levels=l},95381:(e,t,r)=>{"use strict";r.d(t,{H:()=>c});const n=new(r(52996).Logger)("networks/5.7.1");function i(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new t.PocketProvider(e,r.pocket);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return i(e)},t}function o(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return o(e,t)},r}const a={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:i("homestead")},s={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:i("ropsten")},u={chainId:63,name:"classicMordor",_defaultProvider:o("https://www.ethercluster.com/mordor","classicMordor")},l={unspecified:{chainId:0,name:"unspecified"},homestead:a,mainnet:a,morden:{chainId:2,name:"morden"},ropsten:s,testnet:s,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:i("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:i("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:i("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:i("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:o("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:u,classicTestnet:u,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:o("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:i("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:i("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function c(e){if(null==e)return null;if("number"==typeof e){for(const t in l){const r=l[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=l[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=l[e.name];if(!t)return"number"!=typeof e.chainId&&n.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&n.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var i;return null==r&&t._defaultProvider&&(r=(i=t._defaultProvider)&&"function"==typeof i.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}},90682:(e,t,r)=>{"use strict";r.d(t,{n:()=>o});var n=r(7290),i=r(78231);function o(e,t,r,o,a){let s;e=(0,n.arrayify)(e),t=(0,n.arrayify)(t);let u=1;const l=new Uint8Array(o),c=new Uint8Array(t.length+4);let f,d;c.set(t);for(let h=1;h<=u;h++){c[t.length]=h>>24&255,c[t.length+1]=h>>16&255,c[t.length+2]=h>>8&255,c[t.length+3]=255&h;let p=(0,n.arrayify)((0,i.Gy)(a,e,c));s||(s=p.length,d=new Uint8Array(s),u=Math.ceil(o/s),f=o-(u-1)*s),d.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:()=>u,shallowCopy:()=>c});var n=r(52996);var i=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((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 u(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 c(e){const t={};for(const r in e)t[r]=e[r];return t}const f={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(e){if(null==e||f[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;rp(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])}}},41109:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="providers/5.7.2"},45703:(e,t,r)=>{"use strict";r.d(t,{H2:()=>U,Zk:()=>V});var n=r(38193),i=r(34901),o=r(30710),a=r(91747),s=r(7290),u=r(17062),l=r(24176),c=r(95381),f=r(49809),d=r(78231),h=r(16440),p=r(57064),m=r(92882),g=r.n(m),v=r(52996),y=r(41109),b=r(81093),w=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const _=new v.Logger(y.i);function E(e){return null==e?"null":(32!==(0,s.hexDataLength)(e)&&_.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function k(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[E(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return E(e)})).join("&")}function C(e){if("string"==typeof e){if(e=e.toLowerCase(),32===(0,s.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+k(e);if(n.Sg.isForkEvent(e))throw _.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+k(e.topics||[])}throw new Error("invalid event - "+e)}function M(){return(new Date).getTime()}function x(e){return new Promise((t=>{setTimeout(t,e)}))}const A=["block","network","pending","poll"];class S{constructor(e,t,r){(0,f.defineReadOnly)(this,"tag",e),(0,f.defineReadOnly)(this,"listener",t),(0,f.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||A.indexOf(this.tag)>=0}}const O={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 P(e){return(0,s.hexZeroPad)(a.O$.from(e).toHexString(),32)}function N(e){return o.Base58.encode((0,s.concat)([e,(0,s.hexDataSlice)((0,d.JQ)((0,d.JQ)(e)),0,4)]))}const T=new RegExp("^(ipfs)://(.*)$","i"),I=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),T,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function R(e,t){try{return(0,h.ZN)(B(e,t))}catch(e){}return null}function B(e,t){if("0x"===e)return null;const r=a.O$.from((0,s.hexDataSlice)(e,t,t+32)).toNumber(),n=a.O$.from((0,s.hexDataSlice)(e,r,r+32)).toNumber();return(0,s.hexDataSlice)(e,r+32,r+32+n)}function L(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):_.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function j(e){const t=(0,s.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 D(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function F(e){const t=[];let r=0;for(let n=0;na.O$.from(e).eq(1))).catch((e=>{if(e.code===v.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return w(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,s.hexConcat)([e,(0,l.VM)(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,s.hexConcat)(["0x9061b923",F([(0,l.Kn)(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,s.arrayify)(e).length%32==4&&_.throwError("resolver threw error",v.Logger.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=B(e,0)),e}catch(e){if(e.code===v.Logger.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return w(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?B(r,0):null}))}_getAddress(e,t){const r=O[String(e)];if(null==r&&_.throwError(`unsupported coin type: ${e}`,v.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=(0,s.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 N((0,s.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 N((0,s.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=g().toWords(n.slice(2));return e.unshift(t),g().encode(r.prefix,e)}}return null}getAddress(e){return w(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===u.R?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===v.Logger.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",P(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&_.throwError("invalid or unsupported coin data",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return w(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;re[t]))}return _.throwError("invalid or unsupported content hash data",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return w(this,void 0,void 0,(function*(){let t=(0,h.Y0)(e);t=(0,s.concat)([P(64),P(t.length),t]),t.length%32!=0&&(t=(0,s.concat)([t,(0,s.hexZeroPad)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,s.hexlify)(t));return null==r||"0x"===r?null:(0,h.ZN)(r)}))}}let z=null,q=1;class V extends n.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,f.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,f.getStatic)(new.target,"getNetwork")(e);t?((0,f.defineReadOnly)(this,"_network",t),this.emit("network",t,null)):_.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return w(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||_.throwError("no network detected",v.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,f.defineReadOnly)(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return(0,p.poll)((()=>this._ready().then((e=>e),(e=>{if(e.code!==v.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==z&&(z=new b.Mb),z}static getNetwork(e){return(0,c.H)(null==e?"homestead":e)}ccipReadFetch(e,t,r){return w(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}),u=yield(0,p.fetchJson)({url:a,errorPassThrough:!0},s,((e,t)=>(e.status=t.statusCode,e)));if(u.data)return u.data;const l=u.message||"unknown error";if(u.status>=400&&u.status<500)return _.throwError(`response not found during CCIP fetch: ${l}`,v.Logger.errors.SERVER_ERROR,{url:t,errorMessage:l});o.push(l)}return _.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,v.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return w(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(M()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=M(),r=(0,f.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const i=M();return(e=a.O$.from(e).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return w(this,void 0,void 0,(function*(){const e=q++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}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)_.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",_.makeError("network block skew detected",v.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 w(this,void 0,void 0,(function*(){return _.throwError("provider does not support network detection",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return w(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 x(0),this._network;const r=_.makeError("underlying network changed",v.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=M();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 w(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return w(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 u=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=>w(this,void 0,void 0,(function*(){s||(yield x(1e3),this.getTransactionCount(n.from).then((c=>w(this,void 0,void 0,(function*(){if(!s){if(c<=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((()=>{u()||o(_.makeError("timeout exceeded",v.Logger.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),a.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return w(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return a.O$.from(e)}catch(t){return _.throwError("bad result from backend",v.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,f.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return a.O$.from(n)}catch(e){return _.throwError("bad result from backend",v.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,f.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return a.O$.from(n).toNumber()}catch(e){return _.throwError("bad result from backend",v.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,f.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,s.hexlify)(n)}catch(e){return _.throwError("bad result from backend",v.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,f.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>(0,s.hexValue)(e)))}),i=yield this.perform("getStorageAt",n);try{return(0,s.hexlify)(i)}catch(e){return _.throwError("bad result from backend",v.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,s.hexDataLength)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&_.throwError("Transaction hash mismatch from Provider.sendTransaction.",v.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>w(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&&_.throwError("transaction failed",v.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,s.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(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return w(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?a.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,s.hexlify)(e):null)))})),this.formatter.transactionRequest(yield(0,f.resolveProperties)(r))}))}_getFilter(e){return w(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,f.resolveProperties)(t))}))}_call(e,t,r){return w(this,void 0,void 0,(function*(){r>=10&&_.throwError("CCIP read exceeded maximum redirections",v.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,s.hexDataLength)(i)%32==4)try{const o=(0,s.hexDataSlice)(i,4),u=(0,s.hexDataSlice)(o,0,32);a.O$.from(u).eq(n)||_.throwError("CCIP Read sender did not match",v.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const l=[],c=a.O$.from((0,s.hexDataSlice)(o,32,64)).toNumber(),f=a.O$.from((0,s.hexDataSlice)(o,c,c+32)).toNumber(),d=(0,s.hexDataSlice)(o,c+32);for(let t=0;tw(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 r=0;rthis._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 w(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)((()=>w(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 w(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)((()=>w(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 w(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,f.resolveProperties)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),b.Mb.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return w(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return w(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&_.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 w(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 U(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return w(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||_.throwError("network does not support ENS",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,l.VM)(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return w(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if((0,s.isHexString)(e))throw t}"string"!=typeof e&&_.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return w(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=R(yield this.call({to:r,data:"0x691f3431"+(0,l.VM)(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return w(this,void 0,void 0,(function*(){let t=null;if((0,s.isHexString)(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new U(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==v.Logger.errors.CALL_EXCEPTION)throw e}try{const e=R(yield this.call({to:n,data:"0x691f3431"+(0,l.VM)(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==v.Logger.errors.CALL_EXCEPTION)throw e;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 _.throwError(e+" not implemented",v.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 S(C(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,...t){let r=!1,n=[],i=C(e);return this._events=this._events.filter((e=>e.tag!==i||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=C(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=C(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=C(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=C(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}},81093:(e,t,r)=>{"use strict";r.d(t,{Mb:()=>d,Ed:()=>h,Gp:()=>p,vh:()=>g});var n=r(76455),i=r(91747),o=r(7290),a=r(84076),s=r(49809),u=r(91108),l=r(52996),c=r(41109);const f=new l.Logger(c.i);class d{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),a=this.hex.bind(this),u=this.number.bind(this),l=this.type.bind(this);return e.transaction={hash:o,type:l,accessList:d.allowNull(this.accessList.bind(this),null),blockHash:d.allowNull(o,null),blockNumber:d.allowNull(u,null),transactionIndex:d.allowNull(u,null),confirmations:d.allowNull(u,null),from:t,gasPrice:d.allowNull(r),maxPriorityFeePerGas:d.allowNull(r),maxFeePerGas:d.allowNull(r),gasLimit:r,to:d.allowNull(t,null),value:r,nonce:u,data:i,r:d.allowNull(this.uint256),s:d.allowNull(this.uint256),v:d.allowNull(u),creates:d.allowNull(t,null),raw:d.allowNull(i)},e.transactionRequest={from:d.allowNull(t),nonce:d.allowNull(u),gasLimit:d.allowNull(r),gasPrice:d.allowNull(r),maxPriorityFeePerGas:d.allowNull(r),maxFeePerGas:d.allowNull(r),to:d.allowNull(t),value:d.allowNull(r),data:d.allowNull((e=>this.data(e,!0))),type:d.allowNull(u),accessList:d.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:o,address:t,topics:d.arrayOf(o),data:i,logIndex:u,blockHash:o},e.receipt={to:d.allowNull(this.address,null),from:d.allowNull(this.address,null),contractAddress:d.allowNull(t,null),transactionIndex:u,root:d.allowNull(a),gasUsed:r,logsBloom:d.allowNull(i),blockHash:o,transactionHash:o,logs:d.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:d.allowNull(u,null),cumulativeGasUsed:r,effectiveGasPrice:d.allowNull(r),status:d.allowNull(u),type:l},e.block={hash:d.allowNull(o),parentHash:o,number:u,timestamp:u,nonce:d.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:d.allowNull(t),extraData:i,transactions:d.allowNull(d.arrayOf(o)),baseFeePerGas:d.allowNull(r)},e.blockWithTransactions=(0,s.shallowCopy)(e.block),e.blockWithTransactions.transactions=d.allowNull(d.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:d.allowNull(n,void 0),toBlock:d.allowNull(n,void 0),blockHash:d.allowNull(o,void 0),address:d.allowNull(t,void 0),topics:d.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:d.allowNull(u),blockHash:d.allowNull(o),transactionIndex:u,removed:d.allowNull(this.boolean.bind(this)),address:t,data:d.allowFalsish(i,"0x"),topics:d.arrayOf(o),transactionHash:o,logIndex:u},e}accessList(e){return(0,u.accessListify)(e||[])}number(e){return"0x"===e?0:i.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:i.O$.from(e).toNumber()}bigNumber(e){return i.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,o.isHexString)(e))?e.toLowerCase():f.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,n.getAddress)(e)}callAddress(e){if(!(0,o.isHexString)(e,32))return null;const t=(0,n.getAddress)((0,o.hexDataSlice)(e,12));return t===a.d?null:t}contractAddress(e){return(0,n.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,o.isHexString)(e))return(0,o.hexValue)(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==(0,o.hexDataLength)(r)?f.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=i.O$.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!(0,o.isHexString)(e))throw new Error("invalid uint256");return(0,o.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=d.check(t,e);return n._difficulty=null==r?null:i.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 d.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&i.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=d.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,o.isHexString)(r)&&(r=i.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,u.parse)(e)}receiptLog(e){return d.check(this.formats.receiptLog,e)}receipt(e){const t=d.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=i.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&f.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):f.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&f.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 d.check(this.formats.filter,e)}filterLog(e){return d.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}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 h(e){return e&&"function"==typeof e.isCommunityResource}function p(e){return h(e)&&e.isCommunityResource()}let m=!1;function g(){m||(m=!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("=========================="))}},23803:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AlchemyProvider:()=>C,AlchemyWebSocketProvider:()=>k,AnkrProvider:()=>S,BaseProvider:()=>o.Zk,CloudflareProvider:()=>N,EtherscanProvider:()=>q,FallbackProvider:()=>ie,Formatter:()=>s.Mb,InfuraProvider:()=>le,InfuraWebSocketProvider:()=>ue,IpcProvider:()=>oe,JsonRpcBatchProvider:()=>ce,JsonRpcProvider:()=>l.r,JsonRpcSigner:()=>l.C,NodesmithProvider:()=>de,PocketProvider:()=>me,Provider:()=>n.zt,Resolver:()=>o.H2,StaticJsonRpcProvider:()=>b,UrlJsonRpcProvider:()=>w,Web3Provider:()=>ge.Q,WebSocketProvider:()=>g,getDefaultProvider:()=>ye,getNetwork:()=>i.H,isCommunityResourcable:()=>s.Ed,isCommunityResource:()=>s.Gp,showThrottleMessage:()=>s.vh});var n=r(38193),i=r(95381),o=r(45703),a=r(49809),s=r(81093),u=r(91747),l=r(9163),c=r(52996),f=r(41109);let d=null;try{if(d=WebSocket,null==d)throw new Error("inject please")}catch(e){const t=new c.Logger(f.i);d=function(){t.throwError("WebSockets not supported in this environment",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const p=new c.Logger(f.i);let m=1;class g extends l.r{constructor(e,t){"any"===t&&p.throwError("WebSocketProvider does not support 'any' network yet",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,"string"==typeof e?(0,a.defineReadOnly)(this,"_websocket",new d(this.connection.url)):(0,a.defineReadOnly)(this,"_websocket",e),(0,a.defineReadOnly)(this,"_requests",{}),(0,a.defineReadOnly)(this,"_subs",{}),(0,a.defineReadOnly)(this,"_subIds",{}),(0,a.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,a.defineReadOnly)(e,"code",r.error.code||null),(0,a.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){p.throwError("cannot reset events block on WebSocketProvider",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){p.throwError("cannot set polling interval on WebSocketProvider",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return h(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&p.throwError("cannot set polling on WebSocketProvider",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=m++;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 h(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=u.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 h(this,void 0,void 0,(function*(){this.websocket.readyState===d.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}var v=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const y=new c.Logger(f.i);class b extends l.r{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return v(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||y.throwError("no network detected",c.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,a.defineReadOnly)(this,"_network",t),this.emit("network",t,null))),t}))}}class w extends b{constructor(e,t){y.checkAbstract(new.target,w),e=(0,a.getStatic)(new.target,"getNetwork")(e),t=(0,a.getStatic)(new.target,"getApiKey")(t);super((0,a.getStatic)(new.target,"getUrl")(e,t),e),"string"==typeof t?(0,a.defineReadOnly)(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{(0,a.defineReadOnly)(this,e,t[e])}))}_startPending(){y.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return y.throwError("API provider does not support signing",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return y.throwError("not implemented; sub-classes must override getUrl",c.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const _=new c.Logger(f.i),E="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class k extends g{constructor(e,t){const r=new C(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,a.defineReadOnly)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===E}}class C extends w{static getWebSocketProvider(e,t){return new k(e,t)}static getApiKey(e){return null==e?E:(e&&"string"!=typeof e&&_.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:_.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===E&&(0,s.vh)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===E}}const M=new c.Logger(f.i),x="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function A(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 M.throwArgumentError("unsupported network","name",e)}class S extends w{isCommunityResource(){return this.apiKey===x}static getApiKey(e){return null==e?x:e}static getUrl(e,t){null==t&&(t=x);const r={allowGzip:!0,url:"https://"+A(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===x&&(0,s.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}var O=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const P=new c.Logger(f.i);class N extends w{static getApiKey(e){return null!=e&&P.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 P.throwArgumentError("unsupported network","network",arguments[0]);return r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return O(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 T=r(7290),I=r(91108),R=r(57064),B=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const L=new c.Logger(f.i);function j(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,T.hexValue)((0,T.hexlify)(n)):"accessList"===r?"["+(0,I.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":(0,T.hexlify)(n),t[r]=n)}return t}function D(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 F(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 U(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function z(e,t,r){if("call"===e&&t.code===c.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,T.isHexString)(r))return r;L.throwError("missing revert data in call exception",c.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===c.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/)&&L.throwError("insufficient funds for intrinsic transaction cost",c.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/)&&L.throwError("nonce has already been used",c.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&L.throwError("replacement fee too low",c.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&L.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",c.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class q extends o.Zk{constructor(e,t){super(e),(0,a.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,a.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 L.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 B(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?F:D;this.emit("debug",{action:"request",request:n,provider:this});const u={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&(0,s.vh)(),Promise.resolve(!0))};let l=null;i&&(u.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const c=yield(0,R.fetchJson)(u,l,o||F);return this.emit("debug",{action:"response",request:n,response:(0,a.deepCopy)(c),provider:this}),c}))}detectNetwork(){return B(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return B(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=>z("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=j(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return z("call",e,t.transaction)}}case"estimateGas":{const e=j(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return z("estimateGas",e,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=U(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=U(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&L.throwError("unsupported topic count",c.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||L.throwError("unsupported topic format",c.Logger.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let e=0;e{["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 V=r(14348),H=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const G=new c.Logger(f.i);function Z(){return(new Date).getTime()}function W(e){let t=null;for(let r=0;rt?null:(n+i)/2}function $(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(u.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>$(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]":$(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Q=1;function Y(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 J=[c.Logger.errors.CALL_EXCEPTION,c.Logger.errors.INSUFFICIENT_FUNDS,c.Logger.errors.NONCE_EXPIRED,c.Logger.errors.REPLACEMENT_UNDERPRICED,c.Logger.errors.UNPREDICTABLE_GAS_LIMIT],X=["address","args","errorArgs","errorSignature","method","transaction"];function ee(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 te(e,t,r){let n=$;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=K(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 K(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,a.shallowCopy)(e)).confirmations=-1,$(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=(0,a.shallowCopy)(e)).transactions=e.transactions.map((e=>((e=(0,a.shallowCopy)(e)).confirmations=-1,e))),$(e))}:function(e){return null==e?null:$(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 re(e,t){return H(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:(0,R.poll)((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function ne(e,t,r,n){return H(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,T.isHexString)(n.blockTag)&&(i=yield re(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,T.isHexString)(n.blockTag)&&(i=yield re(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,T.isHexString)(n.blockTag)&&(i=yield re(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&(0,T.isHexString)(n.blockTag)&&(i=yield re(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,T.isHexString)(r.fromBlock)||r.toBlock&&(0,T.isHexString)(r.toBlock))&&(i=yield re(e,t)),i.getLogs(r)}}return G.throwError("unknown method error",c.Logger.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class ie extends o.Zk{constructor(e,t){0===e.length&&G.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(n.zt.isProvider(e)){const t=(0,s.Gp)(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=(0,a.shallowCopy)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=(0,s.Gp)(e)?2e3:750),null==r.weight&&(r.weight=1);const i=r.weight;return(i%1||i>512||i<1)&&G.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,i),Object.freeze(r)})),i=r.reduce(((e,t)=>e+t.weight),0);null==t?t=i/2:t>i&&G.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let o=W(r.map((e=>e.provider.network)));null==o&&(o=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(o),(0,a.defineReadOnly)(this,"providerConfigs",Object.freeze(r)),(0,a.defineReadOnly)(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return H(this,void 0,void 0,(function*(){return W(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return H(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,s=!0;for(;;){const u=Z();let l=n.filter((e=>e.runner&&u-e.starte+t.weight),0);for(;l{r.staller=null})),r.runner=ne(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ee(r,Z()),request:{method:e,params:(0,a.deepCopy)(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ee(r,Z()),request:{method:e,params:(0,a.deepCopy)(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ee(r,null),request:{method:e,params:(0,a.deepCopy)(t)},provider:this}),l+=r.weight}const c=[];n.forEach((e=>{!e.done&&e.runner&&(c.push(e.runner),e.staller&&c.push(e.staller.getPromise()))})),c.length&&(yield Promise.race(c));const f=n.filter((e=>e.done&&null==e.error));if(f.length>=this.quorum){const e=r(f);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;s||(yield Y(100).getPromise()),s=!1}const d=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return J.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={};X.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),G.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})),G.throwError("failed to meet quorum",c.Logger.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>ee(e))),provider:this})}))}}const oe=null,ae=new c.Logger(f.i),se="84842078b09946638c03157f83405213";class ue extends g{constructor(e,t){const r=new le(e,t),n=r.connection;n.password&&ae.throwError("INFURA WebSocket project secrets unsupported",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),(0,a.defineReadOnly)(this,"apiKey",r.projectId),(0,a.defineReadOnly)(this,"projectId",r.projectId),(0,a.defineReadOnly)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===se}}class le extends w{static getWebSocketProvider(e,t){return new ue(e,t)}static getApiKey(e){const t={apiKey:se,projectId:se,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(ae.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),ae.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:ae.throwError("unsupported network",c.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===se&&(0,s.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===se}}class ce extends l.r{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,a.deepCopy)(t),provider:this}),(0,R.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 fe=new c.Logger(f.i);class de extends w{static getApiKey(e){return e&&"string"!=typeof e&&fe.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){fe.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:fe.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const he=new c.Logger(f.i),pe="62e1ad51b37b8e00394bda3b";class me extends w{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=pe:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:he.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:he.throwError("unsupported network",c.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===pe}}var ge=r(71210);const ve=new c.Logger(f.i);function ye(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 l.r(e);case"ws":case"wss":return new g(e);default:ve.throwArgumentError("unsupported URL scheme","network",e)}}const r=(0,i.H)(e);return r&&r._defaultProvider||ve.throwError("unsupported getDefaultProvider network",c.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:ie,AlchemyProvider:C,AnkrProvider:S,CloudflareProvider:N,EtherscanProvider:q,InfuraProvider:le,JsonRpcProvider:l.r,NodesmithProvider:de,PocketProvider:me,Web3Provider:ge.Q,IpcProvider:oe},t)}},9163:(e,t,r)=>{"use strict";r.d(t,{C:()=>k,r:()=>x});var n=r(36026),i=r(91747),o=r(7290),a=r(40888),s=r(49809),u=r(16440),l=r(91108),c=r(57064),f=r(52996),d=r(41109),h=r(45703),p=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const m=new f.Logger(d.i),g=["call","estimateGas"];function v(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=(0,o.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=v(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return v(JSON.parse(e),t)}catch(e){}return null}function y(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=v(t,!0);if(e)return e.data;m.throwError("missing revert data in call exception; Transaction reverted without a reason string",f.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=v(t.body,!1);null==r&&(r=v(t,!1)),r&&m.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",f.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===f.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)&&m.throwError("insufficient funds for intrinsic transaction cost",f.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&m.throwError("nonce has already been used",f.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&m.throwError("replacement fee too low",f.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&m.throwError("legacy pre-eip-155 transactions not supported",f.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),g.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&m.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",f.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function b(e){return new Promise((function(t){setTimeout(t,e)}))}function w(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 _(e){return e?e.toLowerCase():e}const E={};class k extends n.Signer{constructor(e,t,r){if(super(),e!==E)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,s.defineReadOnly)(this,"provider",t),null==r&&(r=0),"string"==typeof r?((0,s.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,s.defineReadOnly)(this,"_index",null)):"number"==typeof r?((0,s.defineReadOnly)(this,"_index",r),(0,s.defineReadOnly)(this,"_address",null)):m.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return m.throwError("cannot alter JSON-RPC Signer connection",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new C(E,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&&m.throwError("unknown account #"+this._index,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=(0,s.shallowCopy)(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=(0,s.shallowCopy)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>p(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&m.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),(0,s.resolveProperties)({tx:(0,s.resolveProperties)(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&m.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&m.throwError("user rejected transaction",f.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),y("sendTransaction",e,n))))}))}signTransaction(e){return m.throwError("signing transactions is unsupported",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return p(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,c.poll)((()=>p(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(e){throw e.transactionHash=r,e}}))}signMessage(e){return p(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,u.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,o.hexlify)(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&m.throwError("user rejected signing",f.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return p(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,u.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,o.hexlify)(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&m.throwError("user rejected signing",f.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return p(this,void 0,void 0,(function*(){const n=yield a.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(a.E.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&m.throwError("user rejected signing",f.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return p(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class C extends k{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 M={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class x extends h.Zk{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,s.getStatic)(this.constructor,"defaultUrl")()),"string"==typeof e?(0,s.defineReadOnly)(this,"connection",Object.freeze({url:e})):(0,s.defineReadOnly)(this,"connection",Object.freeze((0,s.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 p(this,void 0,void 0,(function*(){yield b(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=(0,s.getStatic)(this.constructor,"getNetwork");try{return t(i.O$.from(e).toNumber())}catch(t){return m.throwError("could not detect network",f.Logger.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return m.throwError("could not detect network",f.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new k(E,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,s.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,c.fetchJson)(this.connection,JSON.stringify(r),w).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",[_(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[_(t.address),t.blockTag]];case"getCode":return["eth_getCode",[_(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[_(t.address),(0,o.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,s.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,s.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=_(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return p(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&i.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,s.shallowCopy)(t)).transaction=(0,s.shallowCopy)(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&m.throwError(e+" not implemented",f.Logger.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return y(e,r,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 b(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,s.shallowCopy)(M);if(t)for(const e in t)t[e]&&(r[e]=!0);(0,s.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,o.hexValue)(i.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=(0,o.hexlify)(e[t]))})),e.accessList&&(n.accessList=(0,l.accessListify)(e.accessList)),n}}},71210:(e,t,r)=>{"use strict";r.d(t,{Q:()=>c});var n=r(49809),i=r(52996),o=r(41109),a=r(9163);const s=new i.Logger(o.i);let u=1;function l(e,t){const r="Web3LegacyFetcher";return function(e,i){const o={method:e,params:i,id:u++,jsonrpc:"2.0"};return new Promise(((e,i)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,n.deepCopy)(o),provider:this}),t(o,((t,n)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:o,provider:this}),i(t);if(this.emit("debug",{action:"response",fetcher:r,request:o,response:n,provider:this}),n.error){const e=new Error(n.error.message);return e.code=n.error.code,e.data=n.error.data,i(e)}e(n.result)}))}))}}class c extends a.r{constructor(e,t){null==e&&s.throwArgumentError("missing provider","provider",e);let r=null,i=null,o=null;"function"==typeof e?(r="unknown:",i=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),o=e,e.request?(""===r&&(r="eip-1193:"),i=function(e){return function(t,r){null==r&&(r=[]);const i={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,n.deepCopy)(i),provider:this}),e.request(i).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:e,provider:this}),e}))}}(e)):e.sendAsync?i=l(0,e.sendAsync.bind(e)):e.send?i=l(0,e.send.bind(e)):s.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,n.defineReadOnly)(this,"jsonRpcFetchFunc",i),(0,n.defineReadOnly)(this,"provider",o)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}},6005:(e,t,r)=>{"use strict";r.r(t),r.d(t,{randomBytes:()=>n.O,shuffled:()=>i.y});var n=r(56988),i=r(14348)},56988:(e,t,r)=>{"use strict";r.d(t,{O:()=>u});var n=r(7290),i=r(52996);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(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();let s=a.crypto||a.msCrypto;function u(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"})}})},14348:(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})},35748:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>d,encode:()=>l});var n=r(7290),i=r(52996);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 f(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,{}),c(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,{}),c(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 d(e){const t=(0,n.arrayify)(e),r=f(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},82879:(e,t,r)=>{"use strict";r.r(t),r.d(t,{computeHmac:()=>n.Gy,ripemd160:()=>n.bP,sha256:()=>n.JQ,sha512:()=>n.o,SupportedAlgorithm:()=>i.p});var n=r(78231),i=r(42661)},78231:(e,t,r)=>{"use strict";r.d(t,{Gy:()=>d,bP:()=>l,JQ:()=>c,o:()=>f});var n=r(33715),i=r.n(n),o=r(7290),a=r(42661),s=r(52996);const u=new s.Logger("sha2/5.7.0");function l(e){return"0x"+i().ripemd160().update((0,o.arrayify)(e)).digest("hex")}function c(e){return"0x"+i().sha256().update((0,o.arrayify)(e)).digest("hex")}function f(e){return"0x"+i().sha512().update((0,o.arrayify)(e)).digest("hex")}function d(e,t,r){return a.p[e]||u.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")}},42661:(e,t,r)=>{"use strict";var n;r.d(t,{p:()=>n}),function(e){e.sha256="sha256",e.sha512="sha512"}(n||(n={}))},56189:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SigningKey:()=>K,computePublicKey:()=>Q,recoverPublicKey:()=>$});var n=r(61455),i=r.n(n),o=r(33715),a=r.n(o);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==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")}(null==t&&r.path)}},e(r,r.exports),r.exports}var u=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 c=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}})),f=s((function(e,t){var r=t;r.assert=u,r.toArray=c.toArray,r.zero2=c.zero2,r.toHex=c.toHex,r.encode=c.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)-u:u,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,u=e.andln(3)+i&3,l=t.andln(3)+o&3;3===u&&(u=-1),3===l&&(l=-1),a=0==(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==l?u:-u,r[0].push(a),s=0==(1&l)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?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")}})),d=f.getNAF,h=f.getJSF,p=f.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=d(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+n[u];s.push(a)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),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,u=this._wnafT1,l=this._wnafT2,c=this._wnafT3,f=0;for(o=0;o=1;o-=2){var m=o-1,g=o;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=h(r[m],r[g]);for(f=Math.max(b[0].length,f),c[m]=new Array(f),c[g]=new Array(f),a=0;a=0;o--){for(var C=0;o>=0;){var M=!0;for(a=0;a=0&&C++,E=E.dblp(C),o<0)break;for(a=0;a0?s=l[a][x-1>>1]:x<0&&(s=l[a][-x-1>>1].neg()),E="affine"===s.type?E.mixedAdd(s):E.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,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),u=i.mul(r.b),l=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.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":""},E.prototype.isInfinity=function(){return this.inf},E.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)},E.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)},E.prototype.getX=function(){return this.x.fromRed()},E.prototype.getY=function(){return this.y.fromRed()},E.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)},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)},E.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)},E.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))},E.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},E.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},y(k,g.BasePoint),w.prototype.jpoint=function(e,t,r){return new k(this,e,t,r)},k.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)},k.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},k.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),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),c=l.redMul(s),f=n.redMul(l),d=u.redSqr().redIAdd(c).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},k.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 u=a.redSqr(),l=u.redMul(a),c=r.redMul(u),f=s.redSqr().redIAdd(l).redISub(c).redISub(c),d=s.redMul(c.redISub(f)).redISub(i.redMul(l)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},k.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}},k.prototype.inspect=function(){return this.isInfinity()?"":""},k.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var C=s((function(e,t){var r=t;r.base=g,r.short=_,r.mont=null,r.edwards=null})),M=s((function(e,t){var r,n=t,i=f.assert;function o(e){"short"===e.type?this.curve=new C.short(e):"edwards"===e.type?this.curve=new C.edwards(e):this.curve=new C.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(e){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 x(e){if(!(this instanceof x))return new x(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=c.toArray(e.entropy,e.entropyEnc||"hex"),r=c.toArray(e.nonce,e.nonceEnc||"hex"),n=c.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var A=x;x.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},x.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=c.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var N=f.assert;function T(e,t){if(e instanceof T)return e;this._importDER(e,t)||(N(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 I=T;function R(){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)}}T.prototype._importDER=function(e,t){e=f.toArray(e,t);var r=new R;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 u=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new(i())(a),this.s=new(i())(u),this.recoveryParam=null,!0},T.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),f.encode(o,e)};var D=function(){throw new Error("unsupported")},F=f.assert;function U(e){if(!(this instanceof U))return new U(e);"string"==typeof e&&(F(Object.prototype.hasOwnProperty.call(M,e),"Unknown curve "+e),e=M[e]),e instanceof M.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 P(this,e)},U.prototype.keyFromPrivate=function(e,t){return P.fromPrivate(this,e,t)},U.prototype.keyFromPublic=function(e,t){return P.fromPublic(this,e,t)},U.prototype.genKeyPair=function(e){e||(e={});for(var t=new A({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),u=new A({hash:this.hash,entropy:a,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new(i())(1)),c=0;;c++){var f=n.k?n.k(c):new(i())(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(l)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var m=f.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(d.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 I({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 I(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,u=a.invm(this.n),l=u.mul(e).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),c)).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 I(t,n);var o=this.n,a=new(i())(e),s=t.r,u=t.s,l=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var f=t.r.invm(o),d=o.sub(a).mul(f).umod(o),h=u.mul(f).umod(o);return this.g.mulAdd(d,s,h)},U.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new I(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 q=s((function(e,t){var r=t;r.version="6.5.4",r.utils=f,r.rand=function(){throw new Error("unsupported")},r.curve=C,r.curves=M,r.ec=z,r.eddsa=null})).ec,V=r(7290),H=r(49809);const G=new(r(52996).Logger)("signing-key/5.7.0");let Z=null;function W(){return Z||(Z=new q("secp256k1")),Z}class K{constructor(e){(0,H.defineReadOnly)(this,"curve","secp256k1"),(0,H.defineReadOnly)(this,"privateKey",(0,V.hexlify)(e)),32!==(0,V.hexDataLength)(this.privateKey)&&G.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=W().keyFromPrivate((0,V.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=W().keyFromPublic((0,V.arrayify)(this.publicKey)),r=W().keyFromPublic((0,V.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=W().keyFromPrivate((0,V.arrayify)(this.privateKey)),r=(0,V.arrayify)(e);32!==r.length&&G.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,V.splitSignature)({recoveryParam:n.recoveryParam,r:(0,V.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,V.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=W().keyFromPrivate((0,V.arrayify)(this.privateKey)),r=W().keyFromPublic((0,V.arrayify)(Q(e)));return(0,V.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function $(e,t){const r=(0,V.splitSignature)(t),n={r:(0,V.arrayify)(r.r),s:(0,V.arrayify)(r.s)};return"0x"+W().recoverPubKey((0,V.arrayify)(e),n,r.recoveryParam).encode("hex",!1)}function Q(e,t){const r=(0,V.arrayify)(e);if(32===r.length){const e=new K(r);return t?"0x"+W().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,V.hexlify)(r):"0x"+W().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+W().keyFromPublic(r).getPublic(!0,"hex"):(0,V.hexlify)(r):G.throwArgumentError("invalid public or private key","key","[REDACTED]")}},46156:(e,t,r)=>{"use strict";r.r(t),r.d(t,{UnicodeNormalizationForm:()=>o.Uj,Utf8ErrorFuncs:()=>o.te,Utf8ErrorReason:()=>o.Uw,_toEscapedUtf8String:()=>o.U$,formatBytes32String:()=>a,nameprep:()=>y,parseBytes32String:()=>s,toUtf8Bytes:()=>o.Y0,toUtf8CodePoints:()=>o.XL,toUtf8String:()=>o.ZN});var n=r(17062),i=r(7290),o=r(16440);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))}function u(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 l(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 c(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 f=l("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"),d="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),h=[{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}],p=u("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"),m=u("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"),g=u("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(d.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=c(e,h);if(t)return[e+t.s];let r=p[e];if(r)return r;let n=m[e];return n?[e+n[0]]:g[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,o.XL)((0,o.uu)(t),o.Uj.NFKC),t.forEach((e=>{if(c(e,v))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(c(e,f))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=(0,o.uu)(t);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}},16440:(e,t,r)=>{"use strict";r.d(t,{Uj:()=>o,te:()=>u,Uw:()=>a,U$:()=>d,uu:()=>h,Y0:()=>c,XL:()=>m,ZN:()=>p});var n=r(7290);const i=new(r(52996).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 u=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=u.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 u=n&(1<<8-o-1)-1;for(let n=0;n1114111?i+=t(a.OUT_OF_RANGE,i-1-o,e,r,u):u>=55296&&u<=57343?i+=t(a.UTF16_SURROGATE,i-1-o,e,r,u):u<=s?i+=t(a.OVERLONG,i-1-o,e,r,u):r.push(u))}return r}function c(e,t=o.current){t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<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(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,n.arrayify)(r)}function f(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(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?f(e):f(55296+((e-=65536)>>10&1023))+f(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,t=o.current){return l(c(e,t))}},91108:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TransactionTypes:()=>h,accessListify:()=>E,computeAddress:()=>y,parse:()=>S,recoverAddress:()=>b,serialize:()=>x});var n=r(76455),i=r(91747),o=r(7290),a=r(46547),s=r(93073),u=r(49809),l=r(35748),c=r(56189),f=r(52996);const d=new f.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,c.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,c.recoverPublicKey)((0,o.arrayify)(e),t))}function w(e,t){const r=(0,o.stripZeros)(i.O$.from(e).toHexString());return r.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function _(e,t){return{address:(0,n.getAddress)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,o.hexDataLength)(t)&&d.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function E(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),_(e[0],e[1])):_(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return _(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function k(e){return E(e).map((e=>[e.address,e.storageKeys]))}function C(e,t){if(null!=e.gasPrice){const t=i.O$.from(e.gasPrice),r=i.O$.from(e.maxFeePerGas||0);t.eq(r)||d.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",k(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 M(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",k(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 x(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&d.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,u.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&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.stripZeros)(n),n.length>t.maxLength&&d.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&&d.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&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==a&&d.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 M(e,t);case 2:return C(e,t)}return d.throwError(`unsupported transaction type: ${e.type}`,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function A(e,t,r){try{const r=m(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){d.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(e){}}function S(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&&d.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(e){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 n=r.v-27;const i=t.slice(0,6);0!==r.chainId&&(i.push((0,o.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);const a=(0,s.keccak256)(l.encode(i));try{r.from=b(a,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:n})}catch(e){}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&&d.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:E(t[7])};return 8===t.length||(r.hash=(0,s.keccak256)(e),A(r,t.slice(8),M)),r}(t);case 2:return function(e){const t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&d.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:E(t[8])};return 9===t.length||(i.hash=(0,s.keccak256)(e),A(i,t.slice(9),C)),i}(t)}return d.throwError(`unsupported transaction type: ${t[0]}`,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},57064:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_fetchData:()=>p,fetchJson:()=>m,poll:()=>g});var n=r(34901),i=r(7290),o=r(49809),a=r(16440),s=r(52996);var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};function l(e,t){return u(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 c=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};const f=new s.Logger("web/5.7.1");function d(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(e){}return(0,i.hexlify)(e)}return e}function p(e,t,r){const i="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;f.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);const u="object"==typeof e?e.throttleCallback:null,p="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;f.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||f.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&&f.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 _=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=v?v.match(_):null;if(E)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?(0,n.J)(E[3]):(k=E[3],(0,a.Y0)(k.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(e){f.throwError("processing response error",s.Logger.errors.SERVER_ERROR,{body:h(E[1],E[2]),error:e,requestBody:null,requestMethod:"GET",url:v})}var k;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 C={};Object.keys(g).forEach((e=>{const t=g[e];C[t.key]=t.value})),y.headers=C;const M=function(){let e=null;return{promise:new Promise((function(t,r){w&&(e=setTimeout((()=>{null!=e&&(e=null,r(f.makeError("timeout",s.Logger.errors.TIMEOUT,{requestBody:h(y.body,C["content-type"]),requestMethod:y.method,timeout:w,url:v})))}),w))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),x=function(){return c(this,void 0,void 0,(function*(){for(let e=0;e=300)&&(M.cancel(),f.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,C["content-type"]),requestMethod:y.method,url:v})),r)try{const e=yield r(n,t);return M.cancel(),e}catch(r){if(r.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(t){f.throwError("invalid JSON",s.Logger.errors.SERVER_ERROR,{body:e,error:t})}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 u=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(u++,u>s)return void(a()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));et.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){a()&&n(e)}))}()}))}},76611:(e,t,r)=>{"use strict";r.r(t),r.d(t,{logger:()=>n.k,Wordlist:()=>n.D,wordlists:()=>i.E});var n=r(77902),i=r(22442)},77902:(e,t,r)=>{"use strict";r.d(t,{D:()=>s,k:()=>a});var n=r(86056),i=r(49809),o=r(52996);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)}}},22442:(e,t,r)=>{"use strict";r.d(t,{E:()=>u});var n=r(77902);let i=null;function o(e){if(null==i&&(i="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==n.D.check(e)))throw i=null,new Error("BIP39 Wordlist for en (English) FAILED")}class a extends n.D{constructor(){super("en")}getWord(e){return o(this),i[e]}getWordIndex(e){return o(this),i.indexOf(e)}}const s=new a;n.D.register(s);const u={en:s}},61455: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&&void 0!==window.Buffer?window.Buffer:r(68587).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=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 u(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),u=t;u=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=u(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,u=0,c=r;c1&&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")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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?d[6-u.length]+u+r:u+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],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?m+r:d[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,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u: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,_=b>>>13,E=0|a[4],k=8191&E,C=E>>>13,M=0|a[5],x=8191&M,A=M>>>13,S=0|a[6],O=8191&S,P=S>>>13,N=0|a[7],T=8191&N,I=N>>>13,R=0|a[8],B=8191&R,L=R>>>13,j=0|a[9],D=8191&j,F=j>>>13,U=0|s[0],z=8191&U,q=U>>>13,V=0|s[1],H=8191&V,G=V>>>13,Z=0|s[2],W=8191&Z,K=Z>>>13,$=0|s[3],Q=8191&$,Y=$>>>13,J=0|s[4],X=8191&J,ee=J>>>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],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>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(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q);var ve=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var ye=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,K)|0;var be=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|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 Ee=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,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 ke=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,q))+Math.imul(L,z)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,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,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0;var Ce=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,G))+Math.imul(F,H)|0,o=Math.imul(F,G),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var xe=(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)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,K))+Math.imul(F,W)|0,o=Math.imul(F,K),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(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)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,de)|0;var Se=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|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(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Oe=(l+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(C,pe)|0))<<13)|0;l=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=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(T,ue)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=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,ue)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(L,ue)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,de)|0;var Ne=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Te=(l+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;l=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Ie=(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)+(Ie>>>26)|0,Ie&=67108863;var Re=(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)+(Re>>>26)|0,Re&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=_e,u[6]=Ee,u[7]=ke,u[8]=Ce,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Se,u[13]=Oe,u[14]=Pe,u[15]=Ne,u[16]=Te,u[17]=Ie,u[18]=Re,0!==l&&(u[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!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),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)-(u/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,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}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),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),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()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,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),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),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 x(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 _(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(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 A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,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},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(E,_),E.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},E.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 E;else if("p224"===e)t=new k;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.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")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.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),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=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],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.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)},A.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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},26729: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),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=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 u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a,l;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=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function d(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 u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var l=u.length,c=p(u,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 d(this,e,!0)},o.prototype.rawListeners=function(e){return d(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):[]}},13048:(e,t,r)=>{var n=r(89509).Buffer,i=r(62318);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),u=n.alloc(o||0),l=n.alloc(0);a>0||o>0;){var c=new i;c.update(l),c.update(e),t&&c.update(t),l=c.digest();var f=0;if(a>0){var d=s.length-a;f=Math.min(a,l.length),l.copy(s,d,0,f),a-=f}if(f0){var h=u.length-o,p=Math.min(o,l.length-f);l.copy(u,h,f,f+p),o-=p}}return l.fill(0),{key:s,iv:u}}},92806: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(89509).Buffer,i=r(88473).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(35717)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}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},33715:(e,t,r)=>{var n=t;n.utils=r(26436),n.common=r(95772),n.sha=r(89041),n.ripemd=r(12949),n.hmac=r(52344),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},95772:(e,t,r)=>{"use strict";var n=r(26436),i=r(79746);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(26436),i=r(79746);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(26436),i=r(95772),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,l=i.BlockHash;function c(){if(!(this instanceof c))return new c;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(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 d(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(c,l),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],l=this.h[3],c=this.h[4],y=r,b=n,w=i,_=l,E=c,k=0;k<80;k++){var C=a(o(u(r,f(k,n,i,l),e[p[k]+t],d(k)),g[k]),c);r=c,c=l,l=o(i,10),i=n,n=C,C=a(o(u(y,f(79-k,b,w,_),e[m[k]+t],h(k)),v[k]),E),y=E,E=_,_=o(w,10),w=b,b=C}C=s(this.h[1],i,_),this.h[1]=s(this.h[2],l,E),this.h[2]=s(this.h[3],c,y),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=C},c.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]},89041:(e,t,r)=>{"use strict";t.sha1=r(84761),t.sha224=r(10799),t.sha256=r(89344),t.sha384=r(80772),t.sha512=r(45900)},84761:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(37038),a=n.rotl32,s=n.sum32,u=n.sum32_5,l=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.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(26436),i=r(89344);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")}},89344:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(37038),a=r(79746),s=n.sum32,u=n.sum32_4,l=n.sum32_5,c=o.ch32,f=o.maj32,d=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(26436),i=r(45900);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")}},45900:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(79746),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,l=n.shr64_lo,c=n.sum64,f=n.sum64_hi,d=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 _(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function E(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function k(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function C(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function S(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,1)^s(e,t,8)^l(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function N(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(26436).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}},26436:(e,t,r)=>{"use strict";var n=r(79746),i=r(35717);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 u(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 u=0,l=t;return u+=(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,u,l){var c=0,f=t;return c+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,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}},2156:(e,t,r)=>{"use strict";var n=r(33715),i=r(34504),o=r(79746);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(59864),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 u(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,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=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=c(r);f&&(a=a.concat(f(r)));for(var s=u(t),m=u(r),g=0;g{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===o)o=1-l;else{if(o===u)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,u,l=8*o-i-1,c=(1<>1,d=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=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-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}},35717: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}}},91094:(e,t,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,a=o?window:{};a.JS_SHA3_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=r.g:s&&(a=self);var u=!a.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,c=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),d=[4,1024,262144,67108864],h=[0,8,16,24],p=[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],m=[224,256,384,512],g=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],y={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!c||!a.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 b=function(e,t,r){return function(n){return new R(e,t,e).update(n)[r]()}},w=function(e,t,r){return function(n,i){return new R(e,t,i).update(n)[r]()}},_=function(e,t,r){return function(t,n,i,o){return x["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return x["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 B(e,t,r){R.call(this,e,t,r)}R.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(i);if(null===e)throw new Error(i);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||c&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,a=this.blocks,s=this.byteCount,u=e.length,l=this.blockCount,f=0,d=this.s;f>2]|=e[f]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(a[n>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=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},R.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||c&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;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},R.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&&(L(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},R.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 u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&L(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},B.prototype=new R,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),R.prototype.finalize.call(this)};var L=function(e){var t,r,n,i,o,a,s,u,l,c,f,d,h,m,g,v,y,b,w,_,E,k,C,M,x,A,S,O,P,N,T,I,R,B,L,j,D,F,U,z,q,V,H,G,Z,W,K,$,Q,Y,J,X,ee,te,re,ne,ie,oe,ae,se,ue,le,ce;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],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=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^(u<<1|l>>>31),r=o^(l<<1|u>>>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^(c<<1|f>>>31),r=s^(f<<1|c>>>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=u^(d<<1|h>>>31),r=l^(h<<1|d>>>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=c^(i<<1|o>>>31),r=f^(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,m=e[0],g=e[1],W=e[11]<<4|e[10]>>>28,K=e[10]<<4|e[11]>>>28,O=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=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,$=e[22]<<10|e[23]>>>22,Q=e[23]<<10|e[22]>>>22,N=e[33]<<13|e[32]>>>19,T=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=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,Y=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,I=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,M=e[6]<<28|e[7]>>>4,x=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,_=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,Z=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,S=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,q=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,C=e[49]<<14|e[48]>>>18,e[0]=m^~v&b,e[1]=g^~y&w,e[10]=M^~A&O,e[11]=x^~S&P,e[20]=B^~j&F,e[21]=L^~D&U,e[30]=G^~W&$,e[31]=Z^~K&Q,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=v^~b&_,e[3]=y^~w&E,e[12]=A^~O&N,e[13]=S^~P&T,e[22]=j^~F&z,e[23]=D^~U&q,e[32]=W^~$&Y,e[33]=K^~Q&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~_&k,e[5]=w^~E&C,e[14]=O^~N&I,e[15]=P^~T&R,e[24]=F^~z&V,e[25]=U^~q&H,e[34]=$^~Y&X,e[35]=Q^~J&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=_^~k&m,e[7]=E^~C&g,e[16]=N^~I&M,e[17]=T^~R&x,e[26]=z^~V&B,e[27]=q^~H&L,e[36]=Y^~X&G,e[37]=J^~ee&Z,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=k^~m&v,e[9]=C^~g&y,e[18]=I^~M&A,e[19]=R^~x&S,e[28]=V^~B&j,e[29]=H^~L&D,e[38]=X^~G&W,e[39]=ee^~Z&K,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=p[n],e[1]^=p[n+1]};if(u)e.exports=x;else{for(S=0;S{var n=r(10852)(r(55639),"DataView");e.exports=n},1989:(e,t,r)=>{var n=r(51789),i=r(80401),o=r(57667),a=r(21327),s=r(81866);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(27040),i=r(14125),o=r(82117),a=r(67518),s=r(54705);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(10852)(r(55639),"Map");e.exports=n},83369:(e,t,r)=>{var n=r(24785),i=r(11285),o=r(96e3),a=r(49916),s=r(95265);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(10852)(r(55639),"Promise");e.exports=n},58525:(e,t,r)=>{var n=r(10852)(r(55639),"Set");e.exports=n},88668:(e,t,r)=>{var n=r(83369),i=r(90619),o=r(72385);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(38407),i=r(37465),o=r(63779),a=r(67599),s=r(44758),u=r(34309);function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=s,l.prototype.set=u,e.exports=l},62705:(e,t,r)=>{var n=r(55639).Symbol;e.exports=n},11149:(e,t,r)=>{var n=r(55639).Uint8Array;e.exports=n},70577:(e,t,r)=>{var n=r(10852)(r(55639),"WeakMap");e.exports=n},34963:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r{var n=r(22545),i=r(35694),o=r(1469),a=r(44144),s=r(65776),u=r(36719),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),c=!r&&i(e),f=!r&&!c&&a(e),d=!r&&!c&&!f&&u(e),h=r||c||f||d,p=h?n(e.length,String):[],m=p.length;for(var g in e)!t&&!l.call(e,g)||h&&("length"==g||f&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||p.push(g);return p}},29932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r{var n=r(69877);e.exports=function(e){var t=e.length;return t?e[n(0,t-1)]:void 0}},82908:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{var n=r(77813);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},68866:(e,t,r)=>{var n=r(62488),i=r(1469);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},44239:(e,t,r)=>{var n=r(62705),i=r(89607),o=r(2333),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},9454:(e,t,r)=>{var n=r(44239),i=r(37005);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},90939:(e,t,r)=>{var n=r(2492),i=r(37005);e.exports=function e(t,r,o,a,s){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!=t&&r!=r:n(t,r,o,a,e,s))}},2492:(e,t,r)=>{var n=r(46384),i=r(67114),o=r(18351),a=r(16096),s=r(64160),u=r(1469),l=r(44144),c=r(36719),f="[object Arguments]",d="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,v){var y=u(e),b=u(t),w=y?d:s(e),_=b?d:s(t),E=(w=w==f?h:w)==h,k=(_=_==f?h:_)==h,C=w==_;if(C&&l(e)){if(!l(t))return!1;y=!0,E=!1}if(C&&!E)return v||(v=new n),y||c(e)?i(e,t,r,m,g,v):o(e,t,w,r,m,g,v);if(!(1&r)){var M=E&&p.call(e,"__wrapped__"),x=k&&p.call(t,"__wrapped__");if(M||x){var A=M?e.value():e,S=x?t.value():t;return v||(v=new n),g(A,S,r,m,v)}}return!!C&&(v||(v=new n),a(e,t,r,m,g,v))}},28458:(e,t,r)=>{var n=r(23560),i=r(15346),o=r(13218),a=r(80346),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?d:s).test(a(e))}},38749:(e,t,r)=>{var n=r(44239),i=r(41780),o=r(37005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[n(e)]}},280:(e,t,r)=>{var n=r(25726),i=r(86916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},69877:e=>{var t=Math.floor,r=Math.random;e.exports=function(e,n){return e+t(r()*(n-e+1))}},84992:(e,t,r)=>{var n=r(94311),i=r(52628);e.exports=function(e){return n(i(e))}},22545:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{e.exports=function(e){return function(t){return e(t)}}},47415:(e,t,r)=>{var n=r(29932);e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},74757:e=>{e.exports=function(e,t){return e.has(t)}},14429:(e,t,r)=>{var n=r(55639)["__core-js_shared__"];e.exports=n},67114:(e,t,r)=>{var n=r(88668),i=r(82908),o=r(74757);e.exports=function(e,t,r,a,s,u){var l=1&r,c=e.length,f=t.length;if(c!=f&&!(l&&f>c))return!1;var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var p=-1,m=!0,g=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++p{var n=r(62705),i=r(11149),o=r(77813),a=r(67114),s=r(68776),u=r(21814),l=n?n.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,r,n,l,f,d){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var p=1&n;if(h||(h=u),e.size!=t.size&&!p)return!1;var m=d.get(e);if(m)return m==t;n|=2,d.set(e,t);var g=a(h(e),h(t),n,l,f,d);return d.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},16096:(e,t,r)=>{var n=r(58234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,a,s){var u=1&r,l=n(e),c=l.length;if(c!=n(t).length&&!u)return!1;for(var f=c;f--;){var d=l[f];if(!(u?d in t:i.call(t,d)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=u;++f{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},58234:(e,t,r)=>{var n=r(68866),i=r(99551),o=r(3674);e.exports=function(e){return n(e,o,i)}},45050:(e,t,r)=>{var n=r(37019);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},10852:(e,t,r)=>{var n=r(28458),i=r(47801);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},89607:(e,t,r)=>{var n=r(62705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},99551:(e,t,r)=>{var n=r(34963),i=r(70479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},64160:(e,t,r)=>{var n=r(18552),i=r(57071),o=r(53818),a=r(58525),s=r(70577),u=r(44239),l=r(80346),c="[object Map]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",p="[object DataView]",m=l(n),g=l(i),v=l(o),y=l(a),b=l(s),w=u;(n&&w(new n(new ArrayBuffer(1)))!=p||i&&w(new i)!=c||o&&w(o.resolve())!=f||a&&w(new a)!=d||s&&w(new s)!=h)&&(w=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case m:return p;case g:return c;case v:return f;case y:return d;case b:return h}return t}),e.exports=w},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},51789:(e,t,r)=>{var n=r(94536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},21327:(e,t,r)=>{var n=r(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},81866:(e,t,r)=>{var n=r(94536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},65776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,r)=>{var n,i=r(14429),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},25726:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,r)=>{var n=r(18470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},82117:(e,t,r)=>{var n=r(18470);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},67518:(e,t,r)=>{var n=r(18470);e.exports=function(e){return n(this.__data__,e)>-1}},54705:(e,t,r)=>{var n=r(18470);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},24785:(e,t,r)=>{var n=r(1989),i=r(38407),o=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},11285:(e,t,r)=>{var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:(e,t,r)=>{var n=r(45050);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},68776:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},94536:(e,t,r)=>{var n=r(10852)(Object,"create");e.exports=n},86916:(e,t,r)=>{var n=r(5569)(Object.keys,Object);e.exports=n},31167:(e,t,r)=>{e=r.nmd(e);var n=r(31957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},55639:(e,t,r)=>{var n=r(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},90619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:e=>{e.exports=function(e){return this.__data__.has(e)}},21814:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},37465:(e,t,r)=>{var n=r(38407);e.exports=function(){this.__data__=new n,this.size=0}},63779:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},67599:e=>{e.exports=function(e){return this.__data__.get(e)}},44758:e=>{e.exports=function(e){return this.__data__.has(e)}},34309:(e,t,r)=>{var n=r(38407),i=r(57071),o=r(83369);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},80346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},35694:(e,t,r)=>{var n=r(9454),i=r(37005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:e=>{var t=Array.isArray;e.exports=t},98612:(e,t,r)=>{var n=r(23560),i=r(41780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},44144:(e,t,r)=>{e=r.nmd(e);var n=r(55639),i=r(95062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},18446:(e,t,r)=>{var n=r(90939);e.exports=function(e,t){return n(e,t)}},23560:(e,t,r)=>{var n=r(44239),i=r(13218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},41780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},36719:(e,t,r)=>{var n=r(38749),i=r(7518),o=r(31167),a=o&&o.isTypedArray,s=a?i(a):n;e.exports=s},3674:(e,t,r)=>{var n=r(14636),i=r(280),o=r(98612);e.exports=function(e){return o(e)?n(e):i(e)}},95534:(e,t,r)=>{var n=r(94311),i=r(84992),o=r(1469);e.exports=function(e){return(o(e)?n:i)(e)}},70479:e=>{e.exports=function(){return[]}},95062:e=>{e.exports=function(){return!1}},52628:(e,t,r)=>{var n=r(47415),i=r(3674);e.exports=function(e){return null==e?[]:n(e,i(e))}},62318:(e,t,r)=>{"use strict";var n=r(35717),i=r(3349),o=r(89509).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function l(e,t,r,n,i,o,a){return u(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return u(e+(t&n|r&~n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return u(e+(t^r^n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return u(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=c(r,n=l(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=f(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=d(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(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},21965:(e,t)=>{"use strict";function r(){for(var e=[],t=0;t{var n=r(13550),i=r(29931);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),u=0;!s.testn(u);u++);for(var l=e.shrn(u),c=s.toRed(o);t>0;t--){var f=this._randrange(new n(2),s);r&&r(f);var d=f.toRed(o).redPow(l);if(0!==d.cmp(a)&&0!==d.cmp(c)){for(var h=1;h0;t--){var c=this._randrange(new n(2),a),f=e.gcd(c);if(0!==f.cmpn(1))return f;var d=c.toRed(i).redPow(u);if(0!==d.cmp(o)&&0!==d.cmp(l)){for(var h=1;h{"use strict";r.r(t)},57340:(e,t,r)=>{"use strict";r.r(t)},80256:(e,t,r)=>{"use strict";r.r(t)},17833:(e,t,r)=>{"use strict";r.r(t)},2909:(e,t,r)=>{"use strict";r.r(t)},98814:(e,t,r)=>{"use strict";r.r(t)},44362:(e,t,r)=>{"use strict";r.r(t)},81098:(e,t,r)=>{"use strict";r.r(t)},43826:(e,t,r)=>{"use strict";r.r(t)},86924:(e,t,r)=>{"use strict";r.r(t)},72413:(e,t,r)=>{"use strict";r.r(t)},83099:(e,t,r)=>{"use strict";r.r(t)},62897:(e,t,r)=>{"use strict";r.r(t)},53127:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={games_list_content:"gameListTable_games_list_content__iVRvd",games_list_filter:"gameListTable_games_list_filter__bGr5W",gameList:"gameListTable_gameList__7zcIS",account:"gameListTable_account__ICvge",loadMore:"gameListTable_loadMore__VHsqh",error:"gameListTable_error__LvMpH",more_right:"gameListTable_more_right__NrPTD"}},79746: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)}},34504:(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}},27418:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}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(e){return!1}}()?Object.assign:function(e,o){for(var a,s,u=i(e),l=1;l{"use strict";var n=r(39809);t.certificate=r(41934);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())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;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 c=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=c,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=f;var d=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())}))},41934:(e,t,r)=>{"use strict";var n=r(39809),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())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),l=n.define("RDNSequence",(function(){this.seqof(u)})),c=n.define("Name",(function(){this.choice({rdnSequence:this.use(l)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=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(c),this.key("validity").use(f),this.key("subject").use(c),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(d).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},77631:(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(13048),s=r(44696),u=r(89509).Buffer;e.exports=function(e,t){var r,l=e.toString(),c=l.match(n);if(c){var f="aes"+c[1],d=u.from(c[2],"hex"),h=u.from(c[3].replace(/[\r\n]/g,""),"base64"),p=a(t,d.slice(0,8),parseInt(c[1],10)).key,m=[],g=s.createDecipheriv(f,p,d);m.push(g.update(h)),m.push(g.final()),r=u.concat(m)}else{var v=l.match(o);r=u.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:l.match(i)[1],data:r}}},70980:(e,t,r)=>{var n=r(52818),i=r(22562),o=r(77631),a=r(44696),s=r(25632),u=r(89509).Buffer;function l(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,l,c=o(e,t),f=c.tag,d=c.data;switch(f){case"CERTIFICATE":l=n.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=n.PublicKey.decode(d,"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":d=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,c=e.subjectPrivateKey,f=parseInt(o.split("-")[1],10)/8,d=s.pbkdf2Sync(t,r,n,f,"sha1"),h=a.createDecipheriv(o,d,l),p=[];return p.push(h.update(c)),p.push(h.final()),u.concat(p)}(d=n.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(r=(l=n.PrivateKey.decode(d,"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(d,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=n.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+f)}}e.exports=l,l.signature=n.signature},25632:(e,t,r)=>{t.pbkdf2=r(88638),t.pbkdf2Sync=r(91257)},88638:(e,t,r)=>{var n,i,o=r(89509).Buffer,a=r(77357),s=r(12368),u=r(91257),l=r(57777),c=r.g.crypto&&r.g.crypto.subtle,f={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"},d=[];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 c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.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=f[(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(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=t,t}(y).then((function(r){return r?p(e,t,i,m,y):u(e,t,i,m,g)})),v)}else h()((function(){var r;try{r=u(e,t,i,m,g)}catch(e){return v(e)}v(null,r)}))}},12368:(e,t,r)=>{var n;if(r.g.process&&r.g.process.browser)n="utf-8";else if(r.g.process&&r.g.process.version){n=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";e.exports=n},77357: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")}},91257:(e,t,r)=>{var n=r(78028),i=r(79785),o=r(89072),a=r(89509).Buffer,s=r(77357),u=r(12368),l=r(57777),c=a.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(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),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=s(t):t.length{var n=r(89509).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")}},7900:(e,t,r)=>{t.publicEncrypt=r(16559),t.privateDecrypt=r(26138),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},99199:(e,t,r)=>{var n=r(23482),i=r(89509).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{var n=r(70980),i=r(99199),o=r(57859),a=r(13550),s=r(23663),u=r(23482),l=r(84818),c=r(89509).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var d,h=n(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=r?l(new a(t),h):s(t,h);var m=c.alloc(p-d.length);if(d=c.concat([m,d],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(c.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),f=o(s,i(l,a)),d=o(l,i(f,r-a-1));if(function(e,t){e=c.from(e),t=c.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,d,r);if(3===f)return d;throw new Error("unknown padding")}},16559:(e,t,r)=>{var n=r(70980),i=r(61798),o=r(23482),a=r(99199),s=r(57859),u=r(13550),l=r(84818),c=r(23663),f=r(89509).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var h,p=n(e);if(4===d)h=function(e,t){var r=e.modulus.byteLength(),n=t.length,l=o("sha1").update(f.alloc(0)).digest(),c=l.length,d=2*c;if(n>r-d-2)throw new Error("message too long");var h=f.alloc(r-n-d-2),p=r-c-1,m=i(c),g=s(f.concat([l,h,f.alloc(1,1),t],p),a(m,p)),v=s(m,a(g,c));return new u(f.concat([f.alloc(1),v,g],r))}(p,t);else if(1===d)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?f.alloc(a-o-3,255):function(e){var t,r=f.allocUnsafe(e),n=0,o=i(2*e),a=0;for(;n=0)throw new Error("data too long for modulus")}return r?c(h,p):l(h,p)}},84818:(e,t,r)=>{var n=r(13550),i=r(89509).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},57859:e=>{e.exports=function(e,t){for(var r=e.length,n=-1;++n{"use strict";var n=65536,i=4294967295;var o=r(89509).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>i)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>n)for(var s=0;s{"use strict";function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var i=r(89509),o=r(61798),a=i.Buffer,s=i.kMaxLength,u=r.g.crypto||r.g.msCrypto,l=Math.pow(2,32)-1;function c(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>l||e<0)throw new TypeError("offset must be a uint32");if(e>s||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>l||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>s)throw new RangeError("buffer too small")}function d(e,t,r,n){if(process.browser){var i=e.buffer,a=new Uint8Array(i,t,r);return u.getRandomValues(a),n?void process.nextTick((function(){n(null,e)})):e}if(!n)return o(r).copy(e,t),e;o(r,(function(r,i){if(r)return n(r);i.copy(e,t),n(null,e)}))}u&&u.getRandomValues||!process.browser?(t.randomFill=function(e,t,n,i){if(!(a.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 c(t,e.length),f(n,t,e.length),d(e,t,n,i)},t.randomFillSync=function(e,t,n){void 0===t&&(t=0);if(!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');c(t,e.length),void 0===n&&(n=e.length-t);return f(n,t,e.length),d(e,t,n)}):(t.randomFill=n,t.randomFillSync=n)},60525:(e,t,r)=>{"use strict";r.d(t,{Z:()=>ve});var n=r(29439),i=r(71002),o=r(67294),a=r(42550);function s(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 u(e){for(var t=1;t=0&&r.left>=0&&r.bottom>r.top&&r.right>r.left?r:null}function Q(e){var t,r,n;if(G.isWindow(e)||9===e.nodeType){var i=G.getWindow(e);t={left:G.getWindowScrollLeft(i),top:G.getWindowScrollTop(i)},r=G.viewportWidth(i),n=G.viewportHeight(i)}else t=G.offset(e),r=G.outerWidth(e),n=G.outerHeight(e);return t.width=r,t.height=n,t}function Y(e,t){var r=t.charAt(0),n=t.charAt(1),i=e.width,o=e.height,a=e.left,s=e.top;return"c"===r?s+=o/2:"b"===r&&(s+=o),"c"===n?a+=i/2:"r"===n&&(a+=i),{left:a,top:s}}function J(e,t,r,n,i){var o=Y(t,r[1]),a=Y(e,r[0]),s=[a.left-o.left,a.top-o.top];return{left:Math.round(e.left-s[0]+n[0]-i[0]),top:Math.round(e.top-s[1]+n[1]-i[1])}}function X(e,t,r){return e.leftr.right}function ee(e,t,r){return e.topr.bottom}function te(e,t,r){var n=[];return G.each(e,(function(e){n.push(e.replace(t,(function(e){return r[e]})))})),n}function re(e,t){return e[t]=-e[t],e}function ne(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function ie(e,t){e[0]=ne(e[0],t.width),e[1]=ne(e[1],t.height)}function oe(e,t,r,n){var i=r.points,o=r.offset||[0,0],a=r.targetOffset||[0,0],s=r.overflow,u=r.source||e;o=[].concat(o),a=[].concat(a);var l={},c=0,f=$(u,!(!(s=s||{})||!s.alwaysByViewport)),d=Q(u);ie(o,d),ie(a,t);var h=J(d,t,i,o,a),p=G.merge(d,h);if(f&&(s.adjustX||s.adjustY)&&n){if(s.adjustX&&X(h,d,f)){var m=te(i,/[lr]/gi,{l:"r",r:"l"}),g=re(o,0),v=re(a,0);(function(e,t,r){return e.left>r.right||e.left+t.widthr.bottom||e.top+t.height=r.left&&i.left+o.width>r.right&&(o.width-=i.left+o.width-r.right),n.adjustX&&i.left+o.width>r.right&&(i.left=Math.max(r.right-o.width,r.left)),n.adjustY&&i.top=r.top&&i.top+o.height>r.bottom&&(o.height-=i.top+o.height-r.bottom),n.adjustY&&i.top+o.height>r.bottom&&(i.top=Math.max(r.bottom-o.height,r.top)),G.mix(i,o)}(h,d,f,l))}return p.width!==d.width&&G.css(u,"width",G.width(u)+p.width-d.width),p.height!==d.height&&G.css(u,"height",G.height(u)+p.height-d.height),G.offset(u,{left:p.left,top:p.top},{useCssRight:r.useCssRight,useCssBottom:r.useCssBottom,useCssTransform:r.useCssTransform,ignoreShake:r.ignoreShake}),{points:i,offset:o,targetOffset:a,overflow:l}}function ae(e,t,r){var n=r.target||t,i=Q(n),o=!function(e,t){var r=$(e,t),n=Q(e);return!r||n.left+n.width<=r.left||n.top+n.height<=r.top||n.left>=r.right||n.top>=r.bottom}(n,r.overflow&&r.overflow.alwaysByViewport);return oe(e,i,r,o)}ae.__getOffsetParent=W,ae.__getVisibleRectForElement=$;var se=r(64019),ue=r(18446),le=r.n(ue),ce=r(91033),fe=r(94999);function de(e,t){var r=null,i=null;var o=new ce.Z((function(e){var o=(0,n.Z)(e,1)[0].target;if(document.documentElement.contains(o)){var a=o.getBoundingClientRect(),s=a.width,u=a.height,l=Math.floor(s),c=Math.floor(u);r===l&&i===c||Promise.resolve().then((function(){t({width:l,height:c})})),r=l,i=c}}));return e&&o.observe(e),function(){o.disconnect()}}function he(e){return"function"!=typeof e?null:e()}function pe(e){return"object"===(0,i.Z)(e)&&e?e:null}var me=function(e,t){var r=e.children,i=e.disabled,s=e.target,l=e.align,c=e.onAlign,f=e.monitorWindowResize,d=e.monitorBufferTime,h=void 0===d?0:d,p=o.useRef({}),m=o.useRef(),g=o.Children.only(r),v=o.useRef({});v.current.disabled=i,v.current.target=s,v.current.align=l,v.current.onAlign=c;var y=function(e,t){var r=o.useRef(!1),n=o.useRef(null);function i(){window.clearTimeout(n.current)}return[function o(a){if(r.current&&!0!==a)i(),n.current=window.setTimeout((function(){r.current=!1,o()}),t);else{if(!1===e())return;r.current=!0,i(),n.current=window.setTimeout((function(){r.current=!1}),t)}},function(){r.current=!1,i()}]}((function(){var e=v.current,t=e.disabled,r=e.target,n=e.align,i=e.onAlign;if(!t&&r){var o,a=m.current,s=he(r),l=pe(r);p.current.element=s,p.current.point=l,p.current.align=n;var c=document.activeElement;return s&&function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();if(r.width||r.height)return!0}return!1}(s)?o=ae(a,s,n):l&&(o=function(e,t,r){var n,i,o=G.getDocument(e),a=o.defaultView||o.parentWindow,s=G.getWindowScrollLeft(a),l=G.getWindowScrollTop(a),c=G.viewportWidth(a),f=G.viewportHeight(a),d={left:n="pageX"in t?t.pageX:s+t.clientX,top:i="pageY"in t?t.pageY:l+t.clientY,width:0,height:0},h=n>=0&&n<=s+c&&i>=0&&i<=l+f,p=[r.points[0],"cc"];return oe(e,d,u(u({},r),{},{points:p}),h)}(a,l,n)),function(e,t){e!==document.activeElement&&(0,fe.Z)(t,e)&&"function"==typeof e.focus&&e.focus()}(c,a),i&&o&&i(a,o),!0}return!1}),h),b=(0,n.Z)(y,2),w=b[0],_=b[1],E=o.useRef({cancel:function(){}}),k=o.useRef({cancel:function(){}});o.useEffect((function(){var e,t,r=he(s),n=pe(s);m.current!==k.current.element&&(k.current.cancel(),k.current.element=m.current,k.current.cancel=de(m.current,w)),p.current.element===r&&((e=p.current.point)===(t=n)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&le()(p.current.align,l)||(w(),E.current.element!==r&&(E.current.cancel(),E.current.element=r,E.current.cancel=de(r,w)))})),o.useEffect((function(){i?_():w()}),[i]);var C=o.useRef(null);return o.useEffect((function(){f?C.current||(C.current=(0,se.Z)(window,"resize",w)):C.current&&(C.current.remove(),C.current=null)}),[f]),o.useEffect((function(){return function(){E.current.cancel(),k.current.cancel(),C.current&&C.current.remove(),_()}}),[]),o.useImperativeHandle(t,(function(){return{forceAlign:function(){return w(!0)}}})),o.isValidElement(g)&&(g=o.cloneElement(g,{ref:(0,a.sQ)(g.ref,m)})),g},ge=o.forwardRef(me);ge.displayName="Align";const ve=ge},76154:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Panel:()=>I,default:()=>D});var n=r(87462),i=r(29439),o=r(67294),a=r.t(o,2),s=r(71264),u=r(1413),l=r(94184),c=r.n(l),f={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=f.F1&&t<=f.F12)return!1;switch(t){case f.ALT:case f.CAPS_LOCK:case f.CONTEXT_MENU:case f.CTRL:case f.DOWN:case f.END:case f.ESC:case f.HOME:case f.INSERT:case f.LEFT:case f.MAC_FF_META:case f.META:case f.NUMLOCK:case f.NUM_CENTER:case f.PAGE_DOWN:case f.PAGE_UP:case f.PAUSE:case f.PRINT_SCREEN:case f.RIGHT:case f.SHIFT:case f.UP:case f.WIN_KEY:case f.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=f.ZERO&&e<=f.NINE)return!0;if(e>=f.NUM_ZERO&&e<=f.NUM_MULTIPLY)return!0;if(e>=f.A&&e<=f.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case f.SPACE:case f.QUESTION_MARK:case f.NUM_PLUS:case f.NUM_MINUS:case f.NUM_PERIOD:case f.NUM_DIVISION:case f.SEMICOLON:case f.DASH:case f.EQUALS:case f.COMMA:case f.PERIOD:case f.SLASH:case f.APOSTROPHE:case f.SINGLE_QUOTE:case f.OPEN_SQUARE_BRACKET:case f.BACKSLASH:case f.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const d=f;function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r