PageSourceSearch

https://matchday.fancraze.com/_next/static/chunks/2532.929903cd5c33abe4.js

js fancraze.com collected 2026-10-01 15:22:19 UTC 194,097 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2532],{68147:function(t,e,r){"use strict";let n,i;function o(t,e){return void 0!==e?e:t}r.d(e,{createLink:function(){return t4}});var s,a,u,l,h,f,c,d,p,m,y,g,w,v,b,M,E,x,A,B,S,_,I,T,k="mesh-link-popup",O="mesh-link-popup__backdrop",U="mesh-link-popup__popup-content",R="mesh-link-popup__styles",L="mesh-link-popup__iframe";function P(t){return"clipboard-read *; clipboard-write *; camera ".concat(t,"; microphone ").concat(t)}function z(){var t,e,r=window.document.getElementById(k);null===(t=null==r?void 0:r.parentElement)||void 0===t||t.removeChild(r);var n=window.document.getElementById(R);null===(e=null==n?void 0:n.parentElement)||void 0===e||e.removeChild(n)}var N=["integrationConnected","integrationConnectionError","integrationMfaRequired","integrationMfaEntered","integrationOAuthStarted","integrationAccountSelectionRequired","transferCompleted","integrationSelected","credentialsEntered","transferStarted","transferPreviewed","transferPreviewError","transferExecutionError","transferConfigureError","pageLoaded","transferAssetSelected","transferNetworkSelected","transferAmountEntered","transferMfaRequired","transferMfaEntered","transferKycRequired","transferExecuted","transferInitiated","transferNoEligibleAssets","walletMessageSigned","verifyDonePage","verifyWalletRejected","connectionDeclined","connectionUnavailable","transferDeclined","done","close","SDKinjectedWalletProviders","legalTermsViewed","seeWhatHappenedClicked","executeFundingStep","fundingOptionsUpdated","fundingOptionsViewed","gasIncreaseWarning","linkTransferQRGenerated","methodSelected","defiWalletError","homePageLoaded"],C={platform:"web",version:"3.12.0",origin:window.location.origin};function j(t,e,r){return"".concat(t).concat(t.includes("?")?"&":"?").concat(e,"=").concat(r)}let q=Symbol("Comlink.proxy"),W=Symbol("Comlink.endpoint"),F=Symbol("Comlink.releaseProxy"),D=Symbol("Comlink.finalizer"),V=Symbol("Comlink.thrown"),Z=t=>"object"==typeof t&&null!==t||"function"==typeof t,H=new Map([["proxy",{canHandle:t=>Z(t)&&t[q],serialize(t){let{port1:e,port2:r}=new MessageChannel;return $(t,e),[r,[r]]},deserialize:t=>(t.start(),function(t,e){let r=new Map;return t.addEventListener("message",function(t){let{data:e}=t;if(!e||!e.id)return;let n=r.get(e.id);if(n)try{n(e)}finally{r.delete(e.id)}}),function t(e,r,n=[],i=function(){}){let o=!1,s=new Proxy(i,{get(i,a){if(K(o),a===F)return()=>{Q&&Q.unregister(s),Y(e),r.clear(),o=!0};if("then"===a){if(0===n.length)return{then:()=>s};let t=ti(e,r,{type:"GET",path:n.map(t=>t.toString())}).then(tn);return t.then.bind(t)}return t(e,r,[...n,a])},set(t,i,s){K(o);let[a,u]=tr(s);return ti(e,r,{type:"SET",path:[...n,i].map(t=>t.toString()),value:a},u).then(tn)},apply(i,s,a){K(o);let u=n[n.length-1];if(u===W)return ti(e,r,{type:"ENDPOINT"}).then(tn);if("bind"===u)return t(e,r,n.slice(0,-1));let[l,h]=J(a);return ti(e,r,{type:"APPLY",path:n.map(t=>t.toString()),argumentList:l},h).then(tn)},construct(t,i){K(o);let[s,a]=J(i);return ti(e,r,{type:"CONSTRUCT",path:n.map(t=>t.toString()),argumentList:s},a).then(tn)}});return function(t,e){let r=(X.get(e)||0)+1;X.set(e,r),Q&&Q.register(t,e,t)}(s,e),s}(t,r,[],void 0)}(t))}],["throw",{canHandle:t=>Z(t)&&V in t,serialize:({value:t})=>[t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[]],deserialize(t){if(t.isError)throw Object.assign(Error(t.value.message),t.value);throw t.value}}]]);function $(t,e=globalThis,r=["*"]){e.addEventListener("message",function n(i){let o;if(!i||!i.data)return;if(!function(t,e){for(let r of t)if(e===r||"*"===r||r instanceof RegExp&&r.test(e))return!0;return!1}(r,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}let{id:s,type:a,path:u}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(tn);try{let e=u.slice(0,-1).reduce((t,e)=>t[e],t),r=u.reduce((t,e)=>t[e],t);switch(a){case"GET":o=r;break;case"SET":e[u.slice(-1)[0]]=tn(i.data.value),o=!0;break;case"APPLY":o=r.apply(e,l);break;case"CONSTRUCT":{let t=new r(...l);o=te(t)}
1break;case"ENDPOINT":{var h;let{port1:e,port2:r}=new MessageChannel;$(t,r),h=[e],tt.set(e,h),o=e}break;case"RELEASE":o=void 0;break;default:return}}catch(t){o={value:t,[V]:0}}Promise.resolve(o).catch(t=>({value:t,[V]:0})).then(r=>{let[i,o]=tr(r);e.postMessage(Object.assign(Object.assign({},i),{id:s}),o),"RELEASE"===a&&(e.removeEventListener("message",n),G(e),D in t&&"function"==typeof t[D]&&t[D]())}).catch(t=>{let[r,n]=tr({value:TypeError("Unserializable return value"),[V]:0});e.postMessage(Object.assign(Object.assign({},r),{id:s}),n)})}),e.start&&e.start()}function G(t){"MessagePort"===t.constructor.name&&t.close()}function K(t){if(t)throw Error("Proxy has been released and is not useable")}function Y(t){return ti(t,new Map,{type:"RELEASE"}).then(()=>{G(t)})}let X=new WeakMap,Q="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{let e=(X.get(t)||0)-1;X.set(t,e),0===e&&Y(t)});function J(t){var e;let r=t.map(tr);return[r.map(t=>t[0]),(e=r.map(t=>t[1]),Array.prototype.concat.apply([],e))]}let tt=new WeakMap;function te(t){return Object.assign(t,{[q]:!0})}function tr(t){for(let[e,r]of H)if(r.canHandle(t)){let[n,i]=r.serialize(t);return[{type:"HANDLER",name:e,value:n},i]}return[{type:"RAW",value:t},tt.get(t)||[]]}function tn(t){switch(t.type){case"HANDLER":return H.get(t.name).deserialize(t.value);case"RAW":return t.value}}function ti(t,e,r,n){return new Promise(i=>{let o=[,,,,].fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");e.set(o,i),t.start&&t.start(),t.postMessage(Object.assign({id:o},r),n)})}var to=function(t,e,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)},ts=function(t,e,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r};let ta=new Set,tu={};function tl(){if(i||(i=Object.freeze({register:th,get:tf,on:tc}),"undefined"==typeof window))return i;let t=Object.freeze({register:th});try{window.addEventListener("wallet-standard:register-wallet",({detail:e})=>e(t))}catch(t){console.error("wallet-standard:register-wallet event listener could not be added\n",t)}try{window.dispatchEvent(new tp(t))}catch(t){console.error("wallet-standard:app-ready event could not be dispatched\n",t)}return i}function th(...t){return(t=t.filter(t=>!ta.has(t))).length?(t.forEach(t=>{n=void 0,ta.add(t)}),tu.register?.forEach(e=>td(()=>e(...t))),function(){t.forEach(t=>{n=void 0,ta.delete(t)}),tu.unregister?.forEach(e=>td(()=>e(...t)))}):()=>{}}function tf(){return n||(n=[...ta]),n}function tc(t,e){return tu[t]?.push(e)||(tu[t]=[e]),function(){tu[t]=tu[t]?.filter(t=>e!==t)}}function td(t){try{t()}catch(t){console.error(t)}}
1class tp extends Event{get detail(){return to(this,a,"f")}get type(){return"wallet-standard:app-ready"}constructor(t){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),a.set(this,void 0),ts(this,a,t,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}a=new WeakMap;let tm="solana:signAndSendTransaction",ty="solana:signTransaction",tg="standard:connect",tw="standard:events";function tv(t){return tg in t.features&&tw in t.features&&(tm in t.features||ty in t.features)}var tb=r(90017);class tM extends Error{constructor(t,e){super(t),this.error=e}}class tE extends tM{constructor(){super(...arguments),this.name="WalletNotReadyError"}}class tx extends tM{constructor(){super(...arguments),this.name="WalletConfigError"}}class tA extends tM{constructor(){super(...arguments),this.name="WalletConnectionError"}}class tB extends tM{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}class tS extends tM{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}class t_ extends tM{constructor(){super(...arguments),this.name="WalletAccountError"}}class tI extends tM{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}class tT extends tM{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}class tk extends tM{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}class tO extends tM{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}class tU extends tM{constructor(){super(...arguments),this.name="WalletSignMessageError"}}class tR extends tM{constructor(){super(...arguments),this.name="WalletSignInError"}}(s=u||(u={})).Installed="Installed",s.NotDetected="NotDetected",s.Loadable="Loadable",s.Unsupported="Unsupported";class tL extends tb.Z{get connected(){return!!this.publicKey}async autoConnect(){await this.connect()}async prepareTransaction(t,e,r={}){let n=this.publicKey;if(!n)throw new tT;return t.feePayer=t.feePayer||n,t.recentBlockhash=t.recentBlockhash||(await e.getLatestBlockhash({commitment:r.preflightCommitment,minContextSlot:r.minContextSlot})).blockhash,t}}var tP=r(14001);function tz(t){return"version"in t}let tN="solana:signMessage",tC="solana:signIn",tj="solana:mainnet";function tq(t){switch(t){case"processed":case"confirmed":case"finalized":case void 0:return t;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}let tW="standard:disconnect";new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap;var tF=function(t){if(t.length>=255)throw TypeError("Alphabet too long");let e=new Uint8Array(256);for(let t=0;t<e.length;t++)e[t]=255;for(let r=0;r<t.length;r++){let n=t.charAt(r),i=n.charCodeAt(0);if(255!==e[i])throw TypeError(n+" is ambiguous");e[i]=r}let r=t.length,n=t.charAt(0),i=Math.log(r)/Math.log(256),o=Math.log(256)/Math.log(r);function s(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return new Uint8Array;let o=0,s=0,a=0;for(;t[o]===n;)s++,o++;let u=(t.length-o)*i+1>>>0,l=new Uint8Array(u);for(;o<t.length;){let n=t.charCodeAt(o);if(n>255)return;let i=e[n];if(255===i)return;let s=0;for(let t=u-1;(0!==i||s<a)&&-1!==t;t--,s++)i+=r*l[t]>>>0,l[t]=i%256>>>0,i=i/256>>>0;if(0!==i)throw Error("Non-zero carry");a=s,o++}let h=u-a;for(;h!==u&&0===l[h];)h++;let f=new Uint8Array(s+(u-h)),c=s;for(;h!==u;)f[c++]=l[h++];return f}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===e.length)return"";let i=0,s=0,a=0,u=e.length;for(;a!==u&&0===e[a];)a++,i++;let l=(u-a)*o+1>>>0,h=new Uint8Array(l);for(;a!==u;){let t=e[a],n=0;for(let e=l-1;(0!==t||n<s)&&-1!==e;e--,n++)t+=256*h[e]>>>0,h[e]=t%r>>>0,t=t/r>>>0;if(0!==t)throw Error("Non-zero carry");s=n,a++}let f=l-s;for(;f!==l&&0===h[f];)f++;let c=n.repeat(i);for(;f<l;++f)c+=t.charAt(h[f]);return c},decodeUnsafe:s,decode:function(t){let e=s(t);if(e)return e;throw Error("Non-base"+r+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),tD=function(t,e,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");
1return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)},tV=function(t,e,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r};class tZ extends tL{get name(){return tD(this,y,"f").name}get url(){return"https://github.com/solana-labs/wallet-standard"}get icon(){return tD(this,y,"f").icon}get readyState(){return tD(this,g,"f")}get publicKey(){return tD(this,f,"f")}get connecting(){return tD(this,c,"f")}get supportedTransactionVersions(){return tD(this,m,"f")}get wallet(){return tD(this,y,"f")}get standard(){return!0}constructor({wallet:t}){super(),l.add(this),h.set(this,void 0),f.set(this,void 0),c.set(this,void 0),d.set(this,void 0),p.set(this,void 0),m.set(this,void 0),y.set(this,void 0),g.set(this,"undefined"==typeof window||"undefined"==typeof document?u.Unsupported:u.Installed),E.set(this,t=>{if("accounts"in t){let t=tD(this,y,"f").accounts[0];tD(this,h,"f")&&!tD(this,d,"f")&&t!==tD(this,h,"f")&&(t?tD(this,l,"m",v).call(this,t):(this.emit("error",new tB),tD(this,l,"m",b).call(this)))}"features"in t&&tD(this,l,"m",M).call(this)}),tV(this,y,t,"f"),tV(this,h,null,"f"),tV(this,f,null,"f"),tV(this,c,!1,"f"),tV(this,d,!1,"f"),tV(this,p,tD(this,y,"f").features[tw].on("change",tD(this,E,"f")),"f"),tD(this,l,"m",M).call(this)}destroy(){tV(this,h,null,"f"),tV(this,f,null,"f"),tV(this,c,!1,"f"),tV(this,d,!1,"f");let t=tD(this,p,"f");t&&(tV(this,p,null,"f"),t())}async autoConnect(){return tD(this,l,"m",w).call(this,{silent:!0})}async connect(){return tD(this,l,"m",w).call(this)}async disconnect(){if(tW in tD(this,y,"f").features)try{tV(this,d,!0,"f"),await tD(this,y,"f").features[tW].disconnect()}catch(t){this.emit("error",new tS(t?.message,t))}finally{tV(this,d,!1,"f")}tD(this,l,"m",b).call(this)}async sendTransaction(t,e,r={}){try{var n;let i;let o=tD(this,h,"f");if(!o)throw new tT;if(tm in tD(this,y,"f").features){if(o.features.includes(tm))i=tm;else if(ty in tD(this,y,"f").features&&o.features.includes(ty))i=ty;else throw new t_}else if(ty in tD(this,y,"f").features){if(!o.features.includes(ty))throw new t_;i=ty}else throw new tx;let s=(n=e.rpcEndpoint).includes("https://api.mainnet-beta.solana.com")?tj:/\bdevnet\b/i.test(n)?"solana:devnet":/\btestnet\b/i.test(n)?"solana:testnet":/\blocalhost\b/i.test(n)||/\b127\.0\.0\.1\b/.test(n)?"solana:localnet":tj;if(!o.chains.includes(s))throw new tk;try{let n;let{signers:a,...u}=r;if(tz(t)?(a?.length&&t.sign(a),n=t.serialize()):(t=await this.prepareTransaction(t,e,u),a?.length&&t.partialSign(...a),n=new Uint8Array(t.serialize({requireAllSignatures:!1,verifySignatures:!1}))),i===tm){let[t]=await tD(this,y,"f").features[tm].signAndSendTransaction({account:o,chain:s,transaction:n,options:{preflightCommitment:tq(u.preflightCommitment||e.commitment),skipPreflight:u.skipPreflight,maxRetries:u.maxRetries,minContextSlot:u.minContextSlot}});return tF.encode(t.signature)}{let[t]=await tD(this,y,"f").features[ty].signTransaction({account:o,chain:s,transaction:n,options:{preflightCommitment:tq(u.preflightCommitment||e.commitment),minContextSlot:u.minContextSlot}});return await e.sendRawTransaction(t.signedTransaction,{...u,preflightCommitment:tq(u.preflightCommitment||e.commitment)})}}catch(t){if(t instanceof tM)throw t;throw new tk(t?.message,t)}}catch(t){throw this.emit("error",t),t}}}h=new WeakMap,f=new WeakMap,c=new WeakMap,d=new WeakMap,p=new WeakMap,m=new WeakMap,y=new WeakMap,g=new WeakMap,E=new WeakMap,l=new WeakSet,w=async function(t){try{if(this.connected||this.connecting)return;if(tD(this,g,"f")!==u.Installed)throw new tE;if(tV(this,c,!0,"f"),!tD(this,y,"f").accounts.length)try{await tD(this,y,"f").features[tg].connect(t)}catch(t){throw new tA(t?.message,t)}let e=tD(this,y,"f").accounts[0];if(!e)throw new t_;tD(this,l,"m",v).call(this,e)}catch(t){throw this.emit("error",t),t}finally{tV(this,c,!1,"f")}},v=function(t){let e;try{e=new tP.nh(t.address)}catch(t){throw new tI(t?.message,t)}tV(this,h,t,"f"),tV(this,f,e,"f"),tD(this,l,"m",M).call(this),this.emit
1("connect",e)},b=function(){tV(this,h,null,"f"),tV(this,f,null,"f"),tD(this,l,"m",M).call(this),this.emit("disconnect")},M=function(){let t=tm in tD(this,y,"f").features?tD(this,y,"f").features[tm].supportedTransactionVersions:tD(this,y,"f").features[ty].supportedTransactionVersions;tV(this,m,!function(t,e){if(t===e)return!0;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}(t,["legacy"])?new Set(t):null,"f"),ty in tD(this,y,"f").features&&tD(this,h,"f")?.features.includes(ty)?(this.signTransaction=tD(this,l,"m",x),this.signAllTransactions=tD(this,l,"m",A)):(delete this.signTransaction,delete this.signAllTransactions),tN in tD(this,y,"f").features&&tD(this,h,"f")?.features.includes(tN)?this.signMessage=tD(this,l,"m",B):delete this.signMessage,tC in tD(this,y,"f").features?this.signIn=tD(this,l,"m",S):delete this.signIn},x=async function(t){try{let e=tD(this,h,"f");if(!e)throw new tT;if(!(ty in tD(this,y,"f").features))throw new tx;if(!e.features.includes(ty))throw new t_;try{let r=(await tD(this,y,"f").features[ty].signTransaction({account:e,transaction:tz(t)?t.serialize():new Uint8Array(t.serialize({requireAllSignatures:!1,verifySignatures:!1}))}))[0].signedTransaction;return tz(t)?tP.GS.deserialize(r):tP.YW.from(r)}catch(t){if(t instanceof tM)throw t;throw new tO(t?.message,t)}}catch(t){throw this.emit("error",t),t}},A=async function(t){try{let e=tD(this,h,"f");if(!e)throw new tT;if(!(ty in tD(this,y,"f").features))throw new tx;if(!e.features.includes(ty))throw new t_;try{let r=await tD(this,y,"f").features[ty].signTransaction(...t.map(t=>({account:e,transaction:tz(t)?t.serialize():new Uint8Array(t.serialize({requireAllSignatures:!1,verifySignatures:!1}))})));return t.map((t,e)=>{let n=r[e].signedTransaction;return tz(t)?tP.GS.deserialize(n):tP.YW.from(n)})}catch(t){throw new tO(t?.message,t)}}catch(t){throw this.emit("error",t),t}},B=async function(t){try{let e=tD(this,h,"f");if(!e)throw new tT;if(!(tN in tD(this,y,"f").features))throw new tx;if(!e.features.includes(tN))throw new t_;try{return(await tD(this,y,"f").features[tN].signMessage({account:e,message:t}))[0].signature}catch(t){throw new tU(t?.message,t)}}catch(t){throw this.emit("error",t),t}},S=async function(t={}){try{let e;if(!(tC in tD(this,y,"f").features))throw new tx;try{[e]=await tD(this,y,"f").features[tC].signIn(t)}catch(t){throw new tR(t?.message,t)}if(!e)throw new tR;return tD(this,l,"m",v).call(this,e.account),e}catch(t){throw this.emit("error",t),t}};class tH extends tL{async sendTransaction(t,e,r={}){let n=!0;try{if(tz(t)){if(!this.supportedTransactionVersions)throw new tk("Sending versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(t.version))throw new tk(`Sending transaction version ${t.version} isn't supported by this wallet`);try{let n=(t=await this.signTransaction(t)).serialize();return await e.sendRawTransaction(n,r)}catch(t){if(t instanceof tO)throw n=!1,t;throw new tk(t?.message,t)}}else try{let{signers:n,...i}=r;t=await this.prepareTransaction(t,e,i),n?.length&&t.partialSign(...n);let o=(t=await this.signTransaction(t)).serialize();return await e.sendRawTransaction(o,i)}catch(t){if(t instanceof tO)throw n=!1,t;throw new tk(t?.message,t)}}catch(t){throw n&&this.emit("error",t),t}}async signAllTransactions(t){for(let e of t)if(tz(e)){if(!this.supportedTransactionVersions)throw new tO("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(e.version))throw new tO(`Signing transaction version ${e.version} isn't supported by this wallet`)}let e=[];for(let r of t)e.push(await this.signTransaction(r));return e}}class t$ extends tH{}class tG extends t${name="Base Wallet";url="https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad";icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI1MTIiIGN5PSI1MTIiIHI9IjUxMiIgZmlsbD0iIzAwNTJGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1MiA1MTJDMTUyIDcxMC44MjMgMzEzLjE3NyA4NzIgNTEyIDg3MkM3MTAuODIzIDg3MiA4NzIgNzEwLjgyMyA4NzIgNTEyQzg3MiAzMTMuMTc3IDcxMC44MjMgMTUyIDUxMiAxNTJDMzEzLjE3NyAxNTIgMTUyIDMxMy4xNzcgMTUyIDUxMlpNNDIwIDM5NkM0MDYuNzQ1IDM5NiAzOTYgNDA2Ljc0NSAzOTYgNDIwVjYwNEMzOTYgNjE3LjI1NSA0MDYuNzQ1IDYyOCA0MjAgNjI4S
1DYwNEM2MTcuMjU1IDYyOCA2MjggNjE3LjI1NSA2MjggNjA0VjQyMEM2MjggNDA2Ljc0NSA2MTcuMjU1IDM5NiA2MDQgMzk2SDQyMFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=";supportedTransactionVersions=new Set(["legacy",0]);_connecting;_wallet;_publicKey;_readyState="undefined"==typeof window||"undefined"==typeof document?u.Unsupported:u.NotDetected;constructor(){super(),this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==u.Unsupported&&function(t){if("undefined"==typeof window||"undefined"==typeof document)return;let e=[];function r(){if(t())for(let t of e)t()}let n=setInterval(r,1e3);e.push(()=>clearInterval(n)),"loading"===document.readyState&&(document.addEventListener("DOMContentLoaded",r,{once:!0}),e.push(()=>document.removeEventListener("DOMContentLoaded",r))),"complete"!==document.readyState&&(window.addEventListener("load",r,{once:!0}),e.push(()=>window.removeEventListener("load",r))),r()}(()=>!!window?.coinbaseSolana&&(this._readyState=u.Installed,this.emit("readyStateChange",this._readyState),!0))}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{let t;if(this.connected||this.connecting)return;if(this._readyState!==u.Installed)throw new tE;this._connecting=!0;let e=window.coinbaseSolana;try{await e.connect()}catch(t){throw new tA(t?.message,t)}if(!e.publicKey)throw new t_;try{t=new tP.nh(e.publicKey.toBytes())}catch(t){throw new tI(t?.message,t)}e.on("disconnect",this._disconnected),this._wallet=e,this._publicKey=t,this.emit("connect",t)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){let t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(t){this.emit("error",new tS(t?.message,t))}}this.emit("disconnect")}async sendTransaction(t,e,r={}){try{let n=this._wallet;if(!n)throw new tT;try{let{signers:i,...o}=r;tz(t)?i?.length&&t.sign(i):(t.recentBlockhash||(t=await this.prepareTransaction(t,e,o)),i?.length&&t.partialSign(...i)),!o.preflightCommitment&&e.commitment&&(o.preflightCommitment=e.commitment);let{signature:s}=await n.signAndSendTransaction(t,o);return s}catch(t){if(t instanceof tM)throw t;throw new tk(t?.message,t)}}catch(t){throw this.emit("error",t),t}}async signTransaction(t){try{let e=this._wallet;if(!e)throw new tT;try{return await e.signTransaction(t)||t}catch(t){throw new tO(t?.message,t)}}catch(t){throw this.emit("error",t),t}}async signAllTransactions(t){try{let e=this._wallet;if(!e)throw new tT;try{return await e.signAllTransactions(t)||t}catch(t){throw new tO(t?.message,t)}}catch(t){throw this.emit("error",t),t}}async signMessage(t){try{let e=this._wallet;if(!e)throw new tT;try{let{signature:r}=await e.signMessage(t);return r}catch(t){throw new tU(t?.message,t)}}catch(t){throw this.emit("error",t),t}}_disconnected=()=>{let t=this._wallet;t&&(t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new tB),this.emit("disconnect"))}}let tK="solana:signTransaction";async function tY(t,e,r){let n=t.wallet;if(n&&tK in n.features&&n.accounts.length>0){let i=function(t,e){if(e){let r=t.find(t=>t.address===e);if(!r)throw Error("Connected Solana account not found in the wallet — refusing to sign with a different account");return r}if(1===t.length)return t[0];throw Error("Cannot determine which Solana account to sign with — multiple accounts and none selected")}(n.accounts,r??t.publicKey?.toBase58()),o=n.features[tK],[s]=await o.signTransaction({account:i,transaction:e});if(!s?.signedTransaction)throw Error("Wallet returned no signed transaction");return s.signedTransaction}if(void 0===t.signTransaction)throw Error("Adapter does not support signTransaction");let i=function(t){try{return tP.GS.deserialize(t)}catch{try{return tP.YW.from(t)}catch{throw Error("Failed to deserialize transaction as either versioned or legacy format")}}}(e),o=await t.signTransaction(i);return o instanceof tP.GS?o.serialize():new Uint8Array(o.serialize({requireAllSignatures:!1,verifySignatures:!1}))}class tX{iframe;parentAPI=null;endpoint=null;exposeListeners=[];destroyed=!1;eip6963DiscoveryPromise=null;constructor(t){if(!t)throw Error("BridgeParent requires an iframe element");this.iframe=t,this.initializeConnection()}async initializeConnection(){if(!this.iframe||!this.iframe.contentWindow)return;let t=this.discovereip6963Wallets();this.eip6963DiscoveryPromise=t;let e=this.getSolanaWallets(),r=this.getBitcoinWallets();this.parentAPI={eip6963Wallets:[],eip6963WalletsReady:!1,walletStandardWallets:e,walletStandardWalletsReady:!0,bip122Wallets:r,bip122WalletsReady:!0,tronWallets:[],tronWalletsReady:!1,tonWallets:[],tonWalletsReady:!1,parentOrigin:window.location.origin,discoverTronWallets:t=>{this.parentAPI&&(this.parentAPI.tronWallets=this.getTronWallets(t),this.parentAPI.tronWalletsReady=!0)},discoverTonWallets:t=>{this.parentAPI&&(this.parentAPI.tonWallets=this.getTonWallets(t),this.parentAPI.tonWalletsReady=!0)},subscribeEip6963ProviderEvent:async(t,e,r,n)=>{await this.eip6963DiscoveryPromise;let i=this.parentAPI?.eip6963Wallets??[],o=i.find(e=>e.uuid===t)??(n?i.find(t=>t.rdns===n):void 0);if(!o)throw Error(`subscribeEip6963ProviderEvent: no wallet found for uuid "${t}"`);let s=o.provider;if(!s||"function"!=typeof s.on)return;let a=t=>r(t);return s.on(e,a),te(()=>{s.removeListener?.(e,a)})},subscribeTronProviderEvent:(t,e,r)=>{let n=this.resolveTronProviderByPath(t);if(!n)throw Error(`subscribeTronProviderEvent: no provider found at injectedId "${t}"`);let i="function"==typeof n.on?n:this.resolveTronEventEmitter(t,n);if(i){let t=t=>r(t);return i.on(e,t),te(()=>{i.removeListener?.(e,t)})}return te(this.subscribeTronWindowMessage(e,r))},subscribeSolanaWalletEvent:(t,e)=>{let r=this.resolveSolanaAdapterForWalletEvent(t);if(!r)throw Error(`subscribeSolanaWalletEvent: no wallet found for walletId "${t}"`);let n=r.wallet,i=n?.features?.["standard:events"];if(n&&"function"==typeof i?.on){let t=()=>{e(n.accounts?.[0]?.address??null)},r=i.on("change",e=>{e&&"accounts"in e&&t()});return te(()=>{try{r?.()}catch{}})}if("function"!=typeof r.on)return;let o=t=>{e(t?.toBase58?.()??null)},s=()=>e(null);return r.on("connect",o),r.on("disconnect",s),te(()=>{r.off("connect",o),r.off("disconnect",s)})},subscribeBip122WalletEvent:(t,e)=>{let r=this.resolveBip122WalletForEvent(t);if(!r)throw Error(`subscribeBip122WalletEvent: no wallet found for walletId "${t}"`);let n=r.features?.["standard:events"];if("function"!=typeof n?.on)return;let i=()=>{e(r.accounts?.[0]?.address??null)},o=n.on("change",t=>{t&&"accounts"in t&&i()});return te(()=>{try{o?.()}catch{}})}};let n=new URL(this.iframe.src,window.location.href).origin,i=function(t,e=globalThis,r="*"){return{postMessage:(e,n
1)=>t.postMessage(e,r,n),addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}(this.iframe.contentWindow,window,n);if(this.destroyed)return;this.endpoint=i;let o=this.iframe.contentWindow,s=new WeakMap,a=i.addEventListener.bind(i),u=i.removeEventListener.bind(i);i.addEventListener=(t,e,r)=>{if("message"===t){let n=t=>{t.source===o&&("function"==typeof e?e.call(t.currentTarget,t):e.handleEvent(t))};s.set(e,n),this.exposeListeners.push({listener:n,options:r}),a(t,n,r);return}a(t,e,r)},i.removeEventListener=(t,e,r)=>{let n="message"===t?s.get(e)??e:e;u(t,n,r)},$(this.parentAPI,i,[n]),t.then(t=>{this.parentAPI&&(this.parentAPI.eip6963Wallets=t,this.parentAPI.eip6963WalletsReady=!0)})}async discovereip6963Wallets(){return new Promise(t=>{let e=[],r=t=>{let{info:r,provider:n}=t.detail;-1===e.findIndex(t=>t.uuid===r.uuid)&&e.push({uuid:r.uuid,name:r.name,icon:r.icon,rdns:r.rdns,provider:n})};window.addEventListener("eip6963:announceProvider",r),window.dispatchEvent(new Event("eip6963:requestProvider")),setTimeout(()=>{window.removeEventListener("eip6963:announceProvider",r),t(e)},300)})}getSolanaWallets(){let{get:t}=tl(),e=t(),r=[],n=new Set;for(let t of e)if(this.isSolanaWallet(t)){let e;tv(t)&&(e=new tZ({wallet:t})),r.push({uuid:this.generateWalletId(t),name:t.name,chains:t.chains||[],features:Object.keys(t.features),adapter:e?{name:e.name,url:e.url,icon:e.icon,readyState:e.readyState,publicKey:te({get value(){return e.publicKey},toBase58:async()=>e.publicKey?.toBase58(),toJSON:async()=>e.publicKey?.toJSON(),toBytes:async()=>e.publicKey?.toBytes(),toBuffer:async()=>e.publicKey?.toBuffer(),toString:async()=>e.publicKey?.toString()}),connecting:e.connecting,connected:e.connected,supportedTransactionVersions:e.supportedTransactionVersions,wallet:e.wallet,standard:e.standard,destroy:async()=>await e.destroy(),autoConnect:async()=>await e.autoConnect(),connect:async()=>await e.connect(),disconnect:async()=>await e.disconnect(),sendTransaction:async(t,r,n)=>await e.sendTransaction(t,r,n),signTransaction:async t=>void 0!==e.signTransaction?await e.signTransaction(t):Error("Adapter does not support signTransaction"),signAllTransactions:async t=>void 0!==e.signAllTransactions?await e.signAllTransactions(t):Error("Adapter does not support signAllTransactions"),signMessage:async t=>void 0!==e.signMessage?await e.signMessage(t):Error("Adapter does not support signMessage"),signIn:async t=>void 0!==e.signIn?await e.signIn(t):Error("Adapter does not support signIn"),customFunctions:["sendSerializedTransaction","signAllSerializedTransactions","signSerializedTransaction","signSolanaTransactionBytes"],signSolanaTransactionBytes:async(t,r)=>tY(e,new Uint8Array(t),r),sendSerializedTransaction:async(t,r)=>{let n;let i=new tP.ew(r),o=new Uint8Array(t);try{n=tP.GS.deserialize(o)}catch{try{n=tP.YW.from(o)}catch{throw Error("Failed to deserialize transaction as either versioned or legacy format")}}return await e.sendTransaction(n,i)},signSerializedTransaction:async t=>{let r;if(void 0===e.signTransaction)return Error("Adapter does not support signTransaction");let n=new Uint8Array(t);try{r=tP.GS.deserialize(n)}catch{try{r=tP.YW.from(n)}catch{return Error("Failed to deserialize transaction as either versioned or legacy format")}}return await e.signTransaction(r)},signAllSerializedTransactions:async t=>{if(void 0===e.signAllTransactions)return Error("Adapter does not support signAllTransactions");let r=[];for(let e of t){let t;let n=new Uint8Array(e);try{t=tP.GS.deserialize(n)}catch{try{t=tP.YW.from(n)}catch{return Error("Failed to deserialize one or more transactions")}}r.push(t)}return await e.signAllTransactions(r)}}:void 0}),n.add(t.name)}try{let t=new tG;t.readyState!==u.Installed&&t.readyState!==u.Loadable||n.has(t.name)||(r.push({uuid:`${t.name}-traditional`.toLowerCase().replace(/\s+/g,"-"),name:t.name,chains:["solana:mainnet"],features:["traditional-adapter"],adapter:{name:t.name,url:t.url,icon:t.icon,readyState:t.readyState,publicKey:te({get value(){return t.publicKey},toBase58:async()=>t.publicKey?.toBase58(),toJSON:async()=>t.publicKey?.toJSON(),toBytes:async()=>t.publicKey?.toBytes(),toBuffer:async()=>t.publicKey?.toBuffer(),toString:async()=>t.publicKey?.toString()}),connecting:t.connecting,connected:t.connected,supportedTransactionVersions:t.supportedTransactionVersions,connect:async()=>await t.connect(),disconnect:async()=>await t.disconnect(),sendTransaction:async(e,r,n)=>{try{return await t.sendTransaction(e,r,n)}catch{throw Error("Failed to send transaction")}},signTransaction:async e=>await t.signTransaction(e),signAllTransactions:async e=>await t.signAllTransactions(e),signMessage:async e=>await t.signMessage(e),customFunctions:["sendSerializedTransaction","signAllSerializedTransactions","signSerializedTransaction","signSolanaTransactionBytes"],signSolanaTransactionBytes:async(e,r)=>tY(t,new Uint8Array(e),r),sendSerializedTransaction:async(e,r)=>{let n;let i=new tP.ew(r),o=new Uint8Array(e);try{n=tP.GS.deserialize(o)}catch{try{n=tP.YW.from(o)}catch{throw Error("Failed to deserialize transaction as either versioned or legacy format")}}try{return await t.sendTransaction(n,i)}catch{throw Error("Failed to send serialized transaction")}},signSerializedTransaction:async e=>{let r;let n=new Uint8Array(e);try{r=tP.GS.deserialize(n)}catch{try{r=tP.YW.from(n)}catch{throw Error("Failed to deserialize transaction as either versioned or legacy format")}}return await t.signTransaction(r)},signAllSerializedTransactions:async e=>{let r=[];for(let t of e){let e;let n=new Uint8Array(t);try{e=tP.GS.deserialize(n)}catch{try{e=tP.YW.from(n)}catch{throw Error("Failed to deserialize one or more transactions")}}r.push(e)}return await t.signAllTransactions(r)}}}),n.add(t.name))}catch{}return r}isSolanaWallet(t){return(t.chains||[]).some(t=>t.startsWith("solana:"))}isBitcoinWallet(t){return(t.chains||[]).some(t=>t.startsWith("bitcoin:"))}getBitcoinWallets(){let{get:t}=tl(),e=t(),r=[];for(let t of e){if(!this.isBitcoinWallet(t))continue;let e=t.features,n=e["bitcoin:connect"],i=e["bitcoin:signMessage"],o=e["bitcoin:signTransaction"];r.push({uuid:this.generateBip122WalletId(t),name:t.name,features:Object.keys(t.features),wallet:{name:t.name,accounts:t.accounts,features:{"bitcoin:connect":n?te({connect:async t=>await n.connect(t)}):void 0,"bitcoin:signMessage":i?te({signMessage:async t=>await i.signMessage(t)}):void 0,"bitcoin:signTransaction":o?te({signTransaction:async t=>await o.signTransaction(t)}):void 0}}})}return r}generateWalletId(t){let e=t.chains?.[0]||"unknown";return`${t.name}-${e}`.toLowerCase().replace(/\s+/g,"-")}generateBip122WalletId(t){let e=t.chains?.find(t=>t.startsWith("bitcoin:"))||t.chains?.[0]||"unknown";return`${t.name}-${e}`.toLowerCase().replace(/\s+/g,"-")}resolveBip122WalletForEvent(t){let{get:e}=tl();for(let r of e())if(this.isBitcoinWallet(r)&&this.generateBip122WalletId(r)===t)return r}isTronProvider(t){return!!t&&"object"==typeof t&&null!=t.tronWeb&&"request"in t}resolveSolanaAdapterForWalletEvent(t){let{get:e}=tl();for(let r of e())if(this.isSolanaWallet(r)&&this.generateWalletId(r)===t){if(!tv(r))return;return new tZ({wallet:r})}try{let e=new tG,r=`${e.name}-traditional`.toLowerCase().replace(/\s+/g,"-"),n=e.readyState===u.Installed||e.readyState===u.Loadable;if(r===t&&n)return e}catch{}}resolveTronProviderByPath(t){return t.split(".").reduce((t,e)=>t?.[e],window)}resolveTronEventEmitter(t,e){if("undefined"==typeof window)return;let r=window,n=r.tron;if(n&&"function"==typeof n.on&&this.isTronProvider(n)&&(e===n||e===r.tronLink||"tron"===t||"tronLink"===t))return n}subscribeTronWindowMessage(t,e){let r=r=>{if(r.source!==window||r.origin!==window.location.origin)return;let n=r?.data?.message,i=n?.action;if("string"==typeof i){if("accountsChanged"===t&&("setAccount"===i||"accountsChanged"===i)){let t=n?.data,r="string"==typeof t?t:Array.isArray(t)?t[0]:t?.address;e(r?[r]:[])}else"disconnect"===t&&"disconnect"===i&&e()}};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)}getTronWallets(t){if("undefined"==typeof window||0===t.length)return[];let e=[],r=new Set;for(let n of t){let t=this.resolveTronProviderByPath(n);if(this.isTronProvider(t)&&!r.has(n)){r.add(n);let i=n.split(".")[0]||n,o=`tron-${n}`.toLowerCase().replace(/\./g,"-"),s=te({ready:t.ready??!1,request:t.request?async e=>await t.request(e):void 0,tronWeb:te({getDefaultAddress:async()=>({base58:t.tronWeb.defaultAddress?.base58||!1,hex:t.tronWeb.defaultAddress?.hex||!1}),trx:te({sign:async e=>await t.tronWeb.trx.sign(e),signMessageV2:async e=>
1await t.tronWeb.trx.signMessageV2(e),sendRawTransaction:async e=>await t.tronWeb.trx.sendRawTransaction(e)}),transactionBuilder:te({sendTrx:async(e,r,n)=>await t.tronWeb.transactionBuilder.sendTrx(e,r,n),triggerSmartContract:async(e,r,n,i,o)=>await t.tronWeb.transactionBuilder.triggerSmartContract(e,r,n,i,o)}),toHex:e=>t.tronWeb.toHex(e)})});e.push({uuid:o,name:i,injectedId:n,provider:s})}}return e}isTonConnectBridge(t){return!!t&&"object"==typeof t&&"function"==typeof t.connect&&"function"==typeof t.send&&"function"==typeof t.listen}getTonWallets(t){if("undefined"==typeof window||0===t.length)return[];let e=[],r=new Set;for(let n of t){if(r.has(n))continue;let t=window[n];if(!t||"object"!=typeof t)continue;let i=t.tonconnect;this.isTonConnectBridge(i)&&(r.add(n),e.push({uuid:`ton-${n}`.toLowerCase(),name:i.deviceInfo?.appName||n,icon:"",jsBridgeKey:n,provider:te({deviceInfo:i.deviceInfo,walletInfo:i.walletInfo,protocolVersion:i.protocolVersion??2,isWalletBrowser:i.isWalletBrowser??!1,connect:async(t,e)=>await i.connect(t,e),restoreConnection:async()=>await i.restoreConnection(),send:async t=>await i.send(t),listen:t=>te(i.listen(t)),disconnect:i.disconnect?async()=>await i.disconnect():void 0})}))}return e}destroy(){if(this.destroyed=!0,this.endpoint)for(let{listener:t,options:e}of this.exposeListeners)this.endpoint.removeEventListener("message",t,e);this.exposeListeners=[],this.parentAPI&&(this.parentAPI.eip6963WalletsReady=!1,this.parentAPI.walletStandardWalletsReady=!1,this.parentAPI.bip122WalletsReady=!1,this.parentAPI.tronWalletsReady=!1,this.parentAPI.tonWalletsReady=!1,this.parentAPI.eip6963Wallets=[],this.parentAPI.walletStandardWallets=[],this.parentAPI.bip122Wallets=[],this.parentAPI.tronWallets=[],this.parentAPI.tonWallets=[],this.parentAPI=null),this.endpoint=null,this.iframe=null}}var tQ="mesh-link-prewarm-container",tJ=function(){return(tJ=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},t0=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})},t1=function(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},t2=L,t6=null,t8=function(){return document.getElementById(t2)};function t3(t){var e,r=t8();if(!r){console.warn("Mesh SDK: Failed to deliver ".concat(t.type," message to the iframe - no iframe element found"));return}if(!T){console.warn("Mesh SDK: Failed to deliver ".concat(t.type," message to the iframe - no link token origin found"));return}try{null===(e=r.contentWindow)||void 0===e||e.postMessage(t,T)}catch(e){console.error("Mesh SDK: Failed to deliver ".concat(t.type," message to the iframe")),console.error(e)}}function t5(t){return t0(this,void 0,void 0,function(){return t1(this,function(e){switch(e.label){case 0:if(!(t.origin!==I&&t.origin!==T))return[3,1];return console.warn("Received message from untrusted origin:",t.origin),[3,3];case 1:return[4,function(t){return t0(this,void 0,void 0,function(){var e,r,n,i,o,s,a,u,l,h,f;return t1(this,function(c){switch(t.data.type){case"brokerageAccountAccessToken":e={accessToken:t.data.payload},null===(r=null==_?void 0:_.onEvent)||void 0===r||r.call(_,{type:"integrationConnected",payload:e}),null===(n=null==_?void 0:_.onIntegrationConnected)||void 0===n||n.call(_,e);break;case"delayedAuthentication":e={delayedAuth:t.data.payload},null===(i=null==_?void 0:_.onEvent)||void 0===i||i.call(_,{type:"integrationConnected",payload:e}),null===(o=null==_?void 0:_.onIntegrationConnected)||void 0===o||o.call(_,e);break;case"transferFinished":e=t.data.payload,null===(s=null==_?void 0:_.onEvent)||void 0===s||s.call(_,{type:"transferCompleted",payload:e}),null===(a=null==_?void 0:_.onTransferFinished)||void 0===a||a.call(_,e);break;
1case"close":case"done":e=null===(u=t.data)||void 0===u?void 0:u.payload,null===(l=null==_?void 0:_.onExit)||void 0===l||l.call(_,null==e?void 0:e.errorMessage,e),null==t6||t6.destroy(),z();break;case"loaded":t3({type:"meshSDKSpecs",payload:tJ({},C)}),(null==_?void 0:_.accessTokens)&&t3({type:"frontAccessTokens",payload:_.accessTokens}),null===(h=null==_?void 0:_.onEvent)||void 0===h||h.call(_,{type:"pageLoaded"});break;default:var d;d=t.data.type,N.includes(d)&&(null===(f=null==_?void 0:_.onEvent)||void 0===f||f.call(_,t.data))}return[2]})})}(t)];case 2:e.sent(),e.label=3;case 3:return[2]}})})}var t4=function(t){var e=function(){var e;null==t6||t6.destroy(),z(),window.removeEventListener("message",t5),null===(e=t.onExit)||void 0===e||e.call(t)};return{openLink:function(e,r){if((w=document.getElementById(tQ))&&w.remove(),!e){null===(v=null==t?void 0:t.onExit)||void 0===v||v.call(t,"Invalid link token!");return}if((null==t?void 0:t.renderType)==="embedded"&&!r){var n,i,s,a,u,l,h,f,c,d,p,m,y,g,w,v,b,M,E='Mesh SDK: Failed to open link - renderType "embedded" requires a customIframeId';console.error(E),null===(b=null==t?void 0:t.onExit)||void 0===b||b.call(t,E);return}_=t;var x=window.atob(e);if(!(x.startsWith("http://")||x.startsWith("https://"))){null===(M=null==t?void 0:t.onExit)||void 0===M||M.call(t,"Invalid link token!");return}if(T=new URL((n=x,"system"===(i=null==_?void 0:_.language)&&(i="undefined"!=typeof navigator&&navigator.language?encodeURIComponent(navigator.language):void 0),s=x=j(n,"lng",i||"en"),u=x=(a=null==_?void 0:_.displayFiatCurrency)?j(s,"fiatCur",a):s,h=x=(l=null==_?void 0:_.theme)?j(u,"th",l):u,x="embedded"===(null==_?void 0:_.renderType)?j(h,"rt","embedded"):h)).origin,window.removeEventListener("message",t5),r){var A=document.getElementById(r);A?(A.allow=P(T),A.src=x,t2=r):console.warn("Mesh SDK: No iframe found with id ".concat(r))}else t2=L,f=x,z(),(c=document.createElement("style")).id=R,d=function(t){try{var e=new URLSearchParams(new URL(t).search).get("link_style");return e&&JSON.parse(window.atob(e))}catch(t){return}}(f),c.textContent="\n  body {\n    position: fixed;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    overflow: hidden;\n  }\n\n  #".concat(k," {\n    all: unset;\n    position: fixed;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    z-index: 10000;\n    pointer-events: auto;\n  }\n\n  #").concat(O," {\n    position: absolute;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    z-index: 10000;\n    background: black;\n    opacity: ").concat(o(.6,null==d?void 0:d.io),";\n  }\n\n  #").concat(U," {\n    position: absolute;\n    height: 80%;\n    max-height: 710px;\n    min-height: 685px;\n    margin: auto;\n    z-index: 10001;\n    width: 30%;\n    max-width: 430px;\n    min-width: 380px;\n    display: flex;\n    flex-direction: column;\n    border-radius: ").concat(o(24,null==d?void 0:d.ir),"px;\n    flex-grow: 1;\n  }\n\n  #").concat(U," iframe {\n    border: none;\n    width: 100%;\n    flex-grow: 1;\n    border-radius: ").concat(o(24,null==d?void 0:d.ir),"px;\n  }\n\n  @media only screen and (max-width: 768px) {\n    #").concat(U," {\n      height: 100vh;\n      width: 100vw;\n      max-width: 100%;\n      min-width: 100%;\n      max-height: 100%;\n      min-height: 100%;\n      border-radius: 0px;\n    }\n\n    #").concat(U," iframe {\n      border-radius: 0px;\n    }\n  }\n\n  @media only screen and (max-height: 710px) {\n    #").concat(U," {\n      max-height: 100%;\n      min-height: 100%;\n    }\n  }\n"),window.document.head.appendChild(c),(p=document.createElement("div")).id=k,(m=document.createElement("div")).id=O,p.appendChild(m),(y=document.createElement("div")).id=U,(g=document.createElement("iframe")).id=L,g.src=f,g.allow=P(new URL(f).origin),y.appendChild(g),p.appendChild(y),window.document.body.appendChild(p);window.addEventListener("message",t5),I=window.location.origin;var B=t8();B&&(t6=new tX(B))},closeLink:e,closeLinkRequested:function(){(null==_?void 0:_.renderType)==="embedded"?t3({type:"closeRequested"}):e()}}};window.meshLinkShouldSkipPrewarm||function(){if(!document.getElementById(tQ)){var t=document.createElement("div");t.id=tQ,t.style.cssText="display: none; position: fixed; top: 0; left: 0; width: 0; height: 0; pointer-events: none; visibility: hidden;";var e=document.createElement("iframe");e.id="mesh-link-prewarm-iframe",e.style.cssText="width: 100%; height: 100%; border: none;",e.loading="eager",e.src="https://web.meshconnect.com/prewarm",t.appendChild(e),document.body.appendChild(t)}}()},69487:function(t,e,r){"use strict";e._O=e.Jq=e.KB=e.u8=e.cv=void 0,e.Ik=e.A9=e.n_=e.gM=void 0;let n=r(52707);function i(t){if(!(t instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}function o(t){return i(t),n.Buffer.from(t.buffer,t.byteOffset,t.length)}class s{constructor(t,e){if(!Number.isInteger(t))throw TypeError("span must be an integer");this.span=t,this.property=e}makeDestinationObject(){return{}}getSpan(t,e){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(t){let e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}}function a(t,e){return e.property?t+"["+e.property+"]":t}class u extends s{isCount(){throw Error("ExternalLayout is abstract")}}class l extends u{constructor(t,e=0,r){if(!(t instanceof s))throw TypeError("layout must be a Layout");if(!Number.isInteger(e))throw TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof h||this.layout instanceof f}decode(t,e=0){return this.layout.decode(t,e+this.offset)}encode(t,e,r=0){return this.layout.encode(t,e,r+this.offset)}}class h extends s{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e=0){return o(t).readUIntLE(e,this.span)}encode(t,e,r=0){return o(e).writeUIntLE(t,r,this.span),this.span}}class f extends s{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e=0){return o(t).readUIntBE(e,this.span)}encode(t,e,r=0){return o(e).writeUIntBE(t,r,this.span),this.span}}function c(t){let e=Math.floor(t/4294967296);return{hi32:e,lo32:t-4294967296*e}}
1function d(t,e){return 4294967296*t+e}class p extends s{constructor(t){super(8,t)}decode(t,e=0){let r=o(t),n=r.readUInt32LE(e);return d(r.readUInt32LE(e+4),n)}encode(t,e,r=0){let n=c(t),i=o(e);return i.writeUInt32LE(n.lo32,r),i.writeUInt32LE(n.hi32,r+4),8}}class m extends s{constructor(t){super(8,t)}decode(t,e=0){let r=o(t),n=r.readUInt32LE(e);return d(r.readInt32LE(e+4),n)}encode(t,e,r=0){let n=c(t),i=o(e);return i.writeUInt32LE(n.lo32,r),i.writeInt32LE(n.hi32,r+4),8}}class y extends s{constructor(t,e,r){if(!(t instanceof s))throw TypeError("elementLayout must be a Layout");if(!(e instanceof u&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;e instanceof u||!(0<t.span)||(n=e*t.span),super(n,r),this.elementLayout=t,this.count=e}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof u&&(n=n.decode(t,e)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let i=0;for(;i<n;)r+=this.elementLayout.getSpan(t,e+r),++i}return r}decode(t,e=0){let r=[],n=0,i=this.count;for(i instanceof u&&(i=i.decode(t,e));n<i;)r.push(this.elementLayout.decode(t,e)),e+=this.elementLayout.getSpan(t,e),n+=1;return r}encode(t,e,r=0){let n=this.elementLayout,i=t.reduce((t,i)=>t+n.encode(i,e,r+t),0);return this.count instanceof u&&this.count.encode(t.length,e,r),i}}class g extends s{constructor(t,e,r){if(!(Array.isArray(t)&&t.reduce((t,e)=>t&&e instanceof s,!0)))throw TypeError("fields must be array of Layout instances");for(let n of("boolean"==typeof e&&void 0===r&&(r=e,e=void 0),t))if(0>n.span&&void 0===n.property)throw Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((t,e)=>t+e.getSpan(),0)}catch(t){}super(n,e),this.fields=t,this.decodePrefixes=!!r}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((r,n)=>{let i=n.getSpan(t,e);return e+=i,r+i},0)}catch(t){throw RangeError("indeterminate span")}return r}decode(t,e=0){i(t);let r=this.makeDestinationObject();for(let n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(t,e)),e+=n.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return r}encode(t,e,r=0){let n=r,i=0,o=0;for(let n of this.fields){let s=n.span;if(o=0<s?s:0,void 0!==n.property){let i=t[n.property];void 0!==i&&(o=n.encode(i,e,r),0>s&&(s=n.getSpan(e,r)))}i=r,r+=s}return i+o-n}fromArray(t){let e=this.makeDestinationObject();for(let r of this.fields)void 0!==r.property&&0<t.length&&(e[r.property]=t.shift());return e}layoutFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}offsetOf(t){if("string"!=typeof t)throw TypeError("property must be string");let e=0;for(let r of this.fields){if(r.property===t)return e;0>r.span?e=-1:0<=e&&(e+=r.span)}}}class w{constructor(t){this.property=t}decode(t,e){throw Error("UnionDiscriminator is abstract")}encode(t,e,r){throw Error("UnionDiscriminator is abstract")}}class v extends w{constructor(t,e){if(!(t instanceof u&&t.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");super(e||t.property||"variant"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,r){return this.layout.encode(t,e,r)}}class b extends s{constructor(t,e,r){let n;if(t instanceof h||t instanceof f)n=new v(new l(t));else if(t instanceof u&&t.isCount())n=new v(t);else if(t instanceof w)n=t;else throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===e&&(e=null),!(null===e||e instanceof s))throw TypeError("defaultLayout must be null or a Layout");if(null!==e){if(0>e.span)throw Error("defaultLayout must have constant span");void 0===e.property&&(e=e.replicate("content"))}let i=-1;e&&0<=(i=e.span)&&(t instanceof h||t instanceof f)&&(i+=n.layout.span),super(i,r),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof h||t instanceof f,this.defaultLayout=e,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(t){return o(t)},this.configGetSourceVariant=function(t){o=t.bind(this)}}getSpan(t,e=0){if(0<=this.span)return this.span;let r=this.getVariant(t,e);if(!r)throw Error("unable to determine span for unrecognized variant");return r.getSpan(t,e)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||e.property&&Object.prototype.hasOwnProperty.call(t,e.property)))return e}else for(let e in this.registry){let r=this.registry[e];if(r.property&&Object.prototype.hasOwnProperty.call(t,r.property))return r}throw Error("unable to infer src variant")}decode(t,e=0){let r;let n=this.discriminator,i=n.decode(t,e),o=this.registry[i];if(void 0===o){let o=this.defaultLayout,s=0;this.usesPrefixDiscriminator&&(s=n.layout.span),(r=this.makeDestinationObject())[n.property]=i,r[o.property]=o.decode(t,e+s)}else r=o.decode(t,e);return r}encode(t,e,r=0){let n=this.getSourceVariant(t);if(void 0===n){let n=this.discriminator,i=this.defaultLayout,o=0;return this.usesPrefixDiscriminator&&(o=n.layout.span),n.encode(t[n.property],e,r),o+i.encode(t[i.property],e,r+o)}return n.encode(t,e,r)}addVariant(t,e,r){let n=new M(this,t,e,r);return this.registry[t]=n,n}getVariant(t,e=0){let r;return t instanceof Uint8Array?r=this.discriminator.decode(t,e):r=t,this.registry[r]}}class M extends s{constructor(t,e,r,n){if(!(t instanceof b))throw TypeError("union must be a Union");if(!Number.isInteger(e)||0>e)throw TypeError("variant must be a (non-negative) integer");if("string"==typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof s))throw TypeError("layout must be a Layout");
1if(null!==t.defaultLayout&&0<=r.span&&r.span>t.defaultLayout.span)throw Error("variant span exceeds span of containing union");if("string"!=typeof n)throw TypeError("variant must have a String property")}let i=t.span;0>t.span&&0<=(i=r?r.span:0)&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span),super(i,n),this.union=t,this.variant=e,this.layout=r||null}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,e+r)),r+n}decode(t,e=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(t,e))throw Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,e+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,e,r=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,e,r);let i=n;if(this.layout&&(this.layout.encode(t[this.property],e,r+n),i+=this.layout.getSpan(e,r+n),0<=this.union.span&&i>this.union.span))throw Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}function E(t){return 0>t&&(t+=4294967296),t}class x extends s{constructor(t,e,r){if(!(t instanceof h||t instanceof f))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof e&&void 0===r&&(r=e,e=!1),4<t.span)throw RangeError("word cannot exceed 32 bits");super(t.span,r),this.word=t,this.msb=!!e,this.fields=[];let n=0;this._packedSetValue=function(t){return n=E(t),this},this._packedGetValue=function(){return n}}decode(t,e=0){let r=this.makeDestinationObject(),n=this.word.decode(t,e);for(let e of(this._packedSetValue(n),this.fields))void 0!==e.property&&(r[e.property]=e.decode(t));return r}encode(t,e,r=0){let n=this.word.decode(e,r);for(let e of(this._packedSetValue(n),this.fields))if(void 0!==e.property){let r=t[e.property];void 0!==r&&e.encode(r)}return this.word.encode(this._packedGetValue(),e,r)}addField(t,e){let r=new A(this,t,e);return this.fields.push(r),r}addBoolean(t){let e=new B(this,t);return this.fields.push(e),e}fieldFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}}class A{constructor(t,e,r){if(!(t instanceof x))throw TypeError("container must be a BitStructure");if(!Number.isInteger(e)||0>=e)throw TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((t,e)=>t+e.bits,0);if(e+i>n)throw Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=e,this.valueMask=(1<<e)-1,32===e&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-e),this.wordMask=E(this.valueMask<<this.start),this.property=r}decode(t,e){return E(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(t){if("number"!=typeof t||!Number.isInteger(t)||t!==E(t&this.valueMask))throw TypeError(a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let e=this.container._packedGetValue(),r=E(t<<this.start);this.container._packedSetValue(E(e&~this.wordMask)|r)}}class B extends A{constructor(t,e){super(t,1,e)}decode(t,e){return!!super.decode(t,e)}encode(t){"boolean"==typeof t&&(t=+t),super.encode(t)}}class S extends s{constructor(t,e){if(!(t instanceof u&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;t instanceof u||(r=t),super(r,e),this.length=t}getSpan(t,e){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),r}decode(t,e=0){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),o(t).slice(e,e+r)}encode(t,e,r){let n=this.length;if(this.length instanceof u&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw TypeError(a("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>e.length)throw RangeError("encoding overruns Uint8Array");let i=o(t);return o(e).write(i.toString("hex"),r,n,"hex"),this.length instanceof u&&this.length.encode(n,e,r),n}}e.cv=(t,e,r)=>new l(t,e,r),e.u8=t=>new h(1,t),e.KB=t=>new h(2,t),e.Jq=t=>new h(4,t),e._O=t=>new p(t),e.gM=t=>new m(t),e.n_=(t,e,r)=>new g(t,e,r),e.A9=(t,e,r)=>new y(t,e,r),e.Ik=(t,e)=>new S(t,e)},36109:function(t,e,r){"use strict";var n=r(29751).Buffer;t.exports=function(t){if(t.length>=255)throw TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;
1i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==e[s])throw TypeError(o+" is ambiguous");e[s]=i}var a=t.length,u=t.charAt(0),l=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function f(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,i=0,o=0;t[r]===u;)i++,r++;for(var s=(t.length-r)*l+1>>>0,h=new Uint8Array(s);r<t.length;){var f=t.charCodeAt(r);if(f>255)return;var c=e[f];if(255===c)return;for(var d=0,p=s-1;(0!==c||d<o)&&-1!==p;p--,d++)c+=a*h[p]>>>0,h[p]=c%256>>>0,c=c/256>>>0;if(0!==c)throw Error("Non-zero carry");o=d,r++}for(var m=s-o;m!==s&&0===h[m];)m++;var y=n.allocUnsafe(i+(s-m));y.fill(0,0,i);for(var g=i;m!==s;)y[g++]=h[m++];return y}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var l=(s-o)*h+1>>>0,f=new Uint8Array(l);o!==s;){for(var c=e[o],d=0,p=l-1;(0!==c||d<i)&&-1!==p;p--,d++)c+=256*f[p]>>>0,f[p]=c%a>>>0,c=c/a>>>0;if(0!==c)throw Error("Non-zero carry");i=d,o++}for(var m=l-i;m!==l&&0===f[m];)m++;for(var y=u.repeat(r);m<l;++m)y+=t.charAt(f[m]);return y},decodeUnsafe:f,decode:function(t){var e=f(t);if(e)return e;throw Error("Non-base"+a+" character")}}}},97396:function(t,e,r){var n=r(36109);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},54424:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(("le"===e||"be"===e)&&(r=e,e=10),this._init(t||0,e||10,r||"be"))}"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{f="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(46601).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);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 "+t)}function a(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function u(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var l=t.charCodeAt(u)-48;o*=i,s=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&s<i,"Invalid character"),o+=s}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return 0>t.cmp(e)?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var i,o,s=0;s<this.length;s++)this.words[s]=0;var a=0;if("be"===r)for(s=t.length-1,i=0;s>=0;s-=3)o=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===r)for(s=0,i=0;s<t.length;s+=3)o=t[s]|t[s+1]<<8|t[s+2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var o=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=a(t,e,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=a(t,e,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,h=r;h<a;h+=n)l=u(t,h,h+n,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var f=1;for(l=u(t,h,t.length,e),h=0;h<s;h++)f*=e;this.imuln(f),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.prototype.copy=function(t){t.words=Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){l(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f,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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16
vendor: 7,761 bytes, line 1
1777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var l=1;l<n;l++){for(var h=u>>>26,f=67108863&u,c=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=c;d++){var p=l-d|0;h+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[l]=0|f,u=0|h}return 0!==u?r.words[l]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var r,i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=((a<<i|o)&16777215).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?c[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=d[t],h=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(h).toString(t);r=(f=f.idivn(h)).isZero()?m+r:c[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=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 t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},f&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(f,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,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 s=t.allocUnsafe?t.allocUnsafe(o):new t(o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return(8191&e)==0&&(r+=13,e>>>=13),(127&e)==0&&(r+=7,e>>>=7),(15&e)==0&&(r+=4,e>>>=4),(3&e)==0&&(r+=2,e>>>=2),(1&e)==0&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return(this.length-1)*26+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n((this.negative|t.negative)==0),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n((this.negative|t.negative)==0),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){this.length>t.length?(e=this,r=t):(e=t,r=this);for(var e,r,n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n((this.negative|t.negative)==0),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];for(r>0&&(this.words[i]=~this.words[i]&67108863>>26-r,i++);i<this.length;i++)this.words[i]=0;return this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),e?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var e,r,n,i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e,r,n=this.iadd(t);return t.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(e=this,r=t):(e=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(n=(0|e.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&n;for(;0!==o&&s<e.length;s++)o=(n=(0|e.words[s])+o)>>26,this.words[s]=67108863&n;if(0===o&&s<e.length&&e!==this)for(;s<e.length;s++)this.words[s]=e.words[s];return this.length=Math.max(this.length,s),e!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var y=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,l=0,h=0|s[0],f=8191&h,c=h>>>13,d=0|s[1],p=8191&d,m=d>>>13,y=0|s[2],g=8191&y,w=y>>>13,v=0|s[3],b=8191&v,M=v>>>13,E=0|s[4],x=8191&E,A=E>>>13,B=0|s[5],S=8191&B,_=B>>>13,I=0|s[6],T=8191&I,k=I>>>13,O=0|s[7],U=8191&O,R=O>>>13,L=0|s[8],P=8191&L,z=L>>>13,N=0|s[9],C=8191&N,j=N>>>13,q=0|a[0],W=8191&q,F=q>>>13,D=0|a[1],V=8191&D,Z=D>>>13,H=0|a[2],$=8191&H,G=H>>>13,K=0|a[3],Y=8191&K,X=K>>>
vendor: 9,627 bytes, line 1
113,Q=0|a[4],J=8191&Q,tt=Q>>>13,te=0|a[5],tr=8191&te,tn=te>>>13,ti=0|a[6],to=8191&ti,ts=ti>>>13,ta=0|a[7],tu=8191&ta,tl=ta>>>13,th=0|a[8],tf=8191&th,tc=th>>>13,td=0|a[9],tp=8191&td,tm=td>>>13;r.negative=t.negative^e.negative,r.length=19;var ty=(l+(n=Math.imul(f,W))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(c,W)|0))<<13)|0;l=((o=Math.imul(c,F))+(i>>>13)|0)+(ty>>>26)|0,ty&=67108863,n=Math.imul(p,W),i=(i=Math.imul(p,F))+Math.imul(m,W)|0,o=Math.imul(m,F);var tg=(l+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(c,V)|0))<<13)|0;l=((o=o+Math.imul(c,Z)|0)+(i>>>13)|0)+(tg>>>26)|0,tg&=67108863,n=Math.imul(g,W),i=(i=Math.imul(g,F))+Math.imul(w,W)|0,o=Math.imul(w,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var tw=(l+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(c,$)|0))<<13)|0;l=((o=o+Math.imul(c,G)|0)+(i>>>13)|0)+(tw>>>26)|0,tw&=67108863,n=Math.imul(b,W),i=(i=Math.imul(b,F))+Math.imul(M,W)|0,o=Math.imul(M,F),n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var tv=(l+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(c,Y)|0))<<13)|0;l=((o=o+Math.imul(c,X)|0)+(i>>>13)|0)+(tv>>>26)|0,tv&=67108863,n=Math.imul(x,W),i=(i=Math.imul(x,F))+Math.imul(A,W)|0,o=Math.imul(A,F),n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var tb=(l+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(c,J)|0))<<13)|0;l=((o=o+Math.imul(c,tt)|0)+(i>>>13)|0)+(tb>>>26)|0,tb&=67108863,n=Math.imul(S,W),i=(i=Math.imul(S,F))+Math.imul(_,W)|0,o=Math.imul(_,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0;var tM=(l+(n=n+Math.imul(f,tr)|0)|0)+((8191&(i=(i=i+Math.imul(f,tn)|0)+Math.imul(c,tr)|0))<<13)|0;l=((o=o+Math.imul(c,tn)|0)+(i>>>13)|0)+(tM>>>26)|0,tM&=67108863,n=Math.imul(T,W),i=(i=Math.imul(T,F))+Math.imul(k,W)|0,o=Math.imul(k,F),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(p,tr)|0,i=(i=i+Math.imul(p,tn)|0)+Math.imul(m,tr)|0,o=o+Math.imul(m,tn)|0;var tE=(l+(n=n+Math.imul(f,to)|0)|0)+((8191&(i=(i=i+Math.imul(f,ts)|0)+Math.imul(c,to)|0))<<13)|0;l=((o=o+Math.imul(c,ts)|0)+(i>>>13)|0)+(tE>>>26)|0,tE&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,F))+Math.imul(R,W)|0,o=Math.imul(R,F),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(g,tr)|0,i=(i=i+Math.imul(g,tn)|0)+Math.imul(w,tr)|0,o=o+Math.imul(w,tn)|0,n=n+Math.imul(p,to)|0,i=(i=i+Math.imul(p,ts)|0)+Math.imul(m,to)|0,o=o+Math.imul(m,ts)|0;var tx=(l+(n=n+Math.imul(f,tu)|0)|0)+((8191&(i=(i=i+Math.imul(f,tl)|0)+Math.imul(c,tu)|0))<<13)|0;l=((o=o+Math.imul(c,tl)|0)+(i>>>13)|0)+(tx>>>26)|0,tx&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,F))+Math.imul(z,W)|0,o=Math.imul(z,F),n=n+Math.imul(U,V)|0,i=(i=i+Math.imul(U,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(b,tr)|0,i=(i=i+Math.imul(b,tn)|0)+Math.imul(M,tr)|0,o=o+Math.imul(M,tn)|0,n=n+Math.imul(g,to)|0,i=(i=i+Math.imul(g,ts)|0)+Math.imul(w,to)|0,o=o+Math.imul(w,ts)|0,n=n+Math.imul(p,tu)|0,i=(i=i+Math.imul(p,tl)|0)+Math.imul(m,tu)|0,o=o+Math.imul(m,tl)|0;var tA=(l+(n=n+Math.imul(f,tf)|0)|0)+((8191&(i=(i=i+Math.imul(f,tc)|0)+Math.imul(c,tf)|0))<<13)|0;l=((o=o+Math.imul(c,tc)|0)+(i>>>13)|0)+(tA>>>26)|0,tA&=67108863,n=Math.imul(C,W),i=(i=Math.imul(C,F))+Math.imul(j,W)|0,o=Math.imul(j,F),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(z,V)|0,o=o+Math.imul(z,Z)|0,n=n+Math.imul(U,$)|0,i=(i=i+Math.imul(U,G)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(x,tr)|0,i=(i=i+Math.imul(x,tn)|0)+Math.imul(A,tr)|0,o=o+Math.imul(A,tn)|0,n=n+Math.imul(b,to)|0,i=(i=i+Math.imul(b,ts)|0)+Math.imul(M,to)|0,o=o+Math.imul(M,ts)|0,n=n+Math.imul(g,tu)|0,i=(i=i+Math.imul(g,tl)|0)+Math.imul(w,tu)|0,o=o+Math.imul(w,tl)|0,n=n+Math.imul(p,tf)|0,i=(i=i+Math.imul(p,tc)|0)+Math.imul(m,tf)|0,o=o+Math.imul(m,tc)|0;var tB=(l+(n=n+Math.imul(f,tp)|0)|0)+((8191&(i=(i=i+Math.imul(f,tm)|0)+Math.imul(c,tp)|0))<<13)|0;l=((o=o+Math.imul(c,tm)|0)+(i>>>13)|0)+(tB>>>26)|0,tB&=67108863,n=Math.imul(C,V),i=(i=Math.imul(C,Z))+Math.imul(j,V)|0,o=Math.imul(j,Z),n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(z,$)|0,o=o+Math.imul(z,G)|0,n=n+Math.imul(U,Y)|0,i=(i=i+Math.imul(U,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(S,tr)|0,i=(i=i+Math.imul(S,tn)|0)+Math.imul(_,tr)|0,o=o+Math.imul(_,tn)|0,n=n+Math.imul(x,to)|0,i=(i=i+Math.imul(x,ts)|0)+Math.imul(A,to)|0,o=o+Math.imul(A,ts)|0,n=n+Math.imul(b,tu)|0,i=(i=i+Math.imul(b,tl)|0)+Math.imul(M,tu)|0,o=o+Math.imul(M,tl)|0,n=n+Math.imul(g,tf)|0,i=(i=i+Math.imul(g,tc)|0)+Math.imul(w,tf)|0,o=o+Math.imul(w,tc)|0;var tS=(l+(n=n+Math.imul(p,tp)|0)|0)+((8191&(i=(i=i+Math.imul(p,tm)|0)+Math.imul(m,tp)|0))<<13)|0;l=((o=o+Math.imul(m,tm)|0)+(i>>>13)|0)+(tS>>>26)|0,tS&=67108863,n=Math.imul(C,$),i=(i=Math.imul(C,G))+Math.imul(j,$)|0,o=Math.imul(j,G),n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(z,Y)|0,o=o+Math.imul(z,X)|0,n=n+Math.imul(U,J)|0,i=(i=i+Math.imul(U,tt)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(T,tr)|0,i=(i=i+Math.imul(T,tn)|0)+Math.imul(k,tr)|0,o=o+Math.imul(k,tn)|0,n=n+Math.imul(S,to)|0,i=(i=i+Math.imul(S,ts)|0)+Math.imul(_,to)|0,o=o+Math.imul(_,ts)|0,n=n+Math.imul(x,tu)|0,i=(i=i+Math.imul(x,tl)|0)+Math.imul(A,tu)|0,o=o+Math.imul(A,tl)|0,n=n+Math.imul(b,tf)|0,i=(i=i+Math.imul(b,tc)|0)+Math.imul(M,tf)|0,o=o+Math.imul(M,tc)|0;var t_=(l+(n=n+Math.imul(g,tp)|0)|0)+((8191&(i=(i=i+Math.imul(g,tm)|0)+Math.imul(w,tp)|0))<<13)|0;l=((o=o+Math.imul(w,tm)|0)+(i>>>13)|0)+(t_>>>26)|0,t_&=67108863,n=Math.imul(C,Y),i=(i=Math.imul(C,X))+Math.imul(j,Y)|0,o=Math.imul(j,X),n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(z,J)|0,o=o+Math.imul(z,tt)|0,n=n+Math.imul(U,tr)|0,i=(i=i+Math.imul(U,tn)|0)+Math.imul(R,tr)|0,o=o+Math.imul(R,tn)|0,n=n+Math.imul(T,to)|0,i=(i=i+Math.imul(T,ts)|0)+Math.imul(k,to)|0,o=o+Math.imul(k,ts)|0,n=n+Math.imul(S,tu)|0,i=(i=i+Math.imul(S,tl)|0)+Math.imul(_,tu)|0,o=o+Math.imul(_,tl)|0,n=n+Math.imul(x,tf)|0,i=(i=i+Math.imul(x,tc)|0)+Math.imul(A,tf)|0,o=o+Math.imul(A,tc)|0;var tI=(l+(n=n+Math.imul(b,tp)|0)|0)+((8191&(i=(i=i+Math.imul(b,tm)|0)+Math.imul(M,tp)|0))<<13)|0;l=((o=o+Math.imul(M,tm)|0)+(i>>>13)|0)+(tI>>>26)|0,tI&=67108863,n=Math.imul(C,J),i=(i=Math.imul(C,tt))+Math.imul(j,J)|0,o=Math.imul(j,tt),n=n+Math.imul(P,tr)|0,i=(i=i+Math.imul(P,tn)|0)+Math.imul(z,tr)|0,o=o+Math.imul(z,tn)|0,n=n+Math.imul(U,to)|0,i=(i=i+Math.imul(U,ts)|0)+Math.imul(R,to)|0,o=o+Math.imul(R,ts)|0,n=n+Math.imul(T,tu)|0,i=(i=i+Math.imul(T,tl)|0)+Math.imul(k,tu)|0,o=o+Math.imul(k,tl)|0,n=n+Math.imul(S,tf)|0,i=(i=i+Math.imul(S,tc)|0)+Math.imul(_,tf)|0,o=o+Math.imul(_,tc)|0;var tT=(l+(n=n+Math.imul(x,tp)|0)|0)+((8191&(i=(i=i+Math.imul(x,tm)|0)+Math.imul(A,tp)|0))<<13)|0;l=((o=o+Math.imul(A,tm)|0)+(i>>>13)|0)+(tT>>>26)|0,tT&=67108863,n=Math.imul(C,tr),i=(i=Math.imul(C,tn))+Math.imul(j,tr)|0,o=Math.imul(j,tn),n=n+Math.imul(P,to)|0,i=(i=i+Math.imul(P,ts)|0)+Math.imul(z,to)|0,o=o+Math.imul(z,ts)|0,n=n+Math.imul(U,tu)|0,i=(i=i+Math.imul(U,tl)|0)+Math.imul(R,tu)|0,o=o+Math.imul(R,tl)|0,n=n+Math.imul(T,tf)|0,i=(i=i+Math.imul(T,tc)|0)+Math.imul(k,tf)|0,o=o+Math.imul(k,tc)|0;var tk=(l+(n=n+Math.imul(S,tp)|0)|0)+((8191&(i=(i=i+Math.imul(S,tm)|0)+Math.imul(_,tp)|0))<<13)|0;l=((o=o+Math.imul(_,tm)|0)+(i>>>13)|0)+(tk>>>26)|0,tk&=67108863,n=Math.imul(C,to),i=(i=Math.imul(C,ts))+Math.imul(j,to)|0,o=Math.imul(j,ts),n=n+Math.imul(P,tu)|0,i=(i=i+Math.imul(P,tl)|0)+Math.imul(z,tu)|0,o=o+Math.imul(z,tl)|0,n=n+Math.imul(U,tf)|0,i=(i=i+Math.imul(U,tc)|0)+Math.imul(R,tf)|0,o=o+Math.imul(R,tc)|0;var tO=(l+(n=n+Math.imul(T,tp)|0)|0)+((8191&(i=(i=i+Math.imul(T,tm)|0)+Math.imul(k,tp)|0))<<13)|0;l=((o=o+Math.imul(k,tm)|0)+(i>>>13)|0)+(tO>>>26)|0,tO&=67108863,n=Math.imul(C,tu),i=(i=Math.imul(C,tl))+Math.imul(j,tu)|0,o=Math.imul(j,tl),n=n+Math.imul(P,tf)|0,i=(i=i+Math.imul(P,tc)|0)+Math.imul(z,tf)|0,o=o+Math.imul(z,tc)|0;var tU=(l+(n=n+Math.imul(U,tp)|0)|0)+((8191&(i=(i=i+Math.imul(U,tm)|0)+Math.imul(R,tp)|0))<<13)|0;l=((o=o+Math.imul(R,tm)|0)+(i>>>13)|0)+(tU>>>
vendor: 25,812 bytes, line 1
126)|0,tU&=67108863,n=Math.imul(C,tf),i=(i=Math.imul(C,tc))+Math.imul(j,tf)|0,o=Math.imul(j,tc);var tR=(l+(n=n+Math.imul(P,tp)|0)|0)+((8191&(i=(i=i+Math.imul(P,tm)|0)+Math.imul(z,tp)|0))<<13)|0;l=((o=o+Math.imul(z,tm)|0)+(i>>>13)|0)+(tR>>>26)|0,tR&=67108863;var tL=(l+(n=Math.imul(C,tp))|0)+((8191&(i=(i=Math.imul(C,tm))+Math.imul(j,tp)|0))<<13)|0;return l=((o=Math.imul(j,tm))+(i>>>13)|0)+(tL>>>26)|0,tL&=67108863,u[0]=ty,u[1]=tg,u[2]=tw,u[3]=tv,u[4]=tb,u[5]=tM,u[6]=tE,u[7]=tx,u[8]=tA,u[9]=tB,u[10]=tS,u[11]=t_,u[12]=tI,u[13]=tT,u[14]=tk,u[15]=tO,u[16]=tU,u[17]=tR,u[18]=tL,0!==l&&(u[19]=l,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),l=Math.max(0,o-t.length+1);l<=u;l++){var h=o-l,f=(0|t.words[h])*(0|e.words[l]),c=67108863&f;s=s+(f/67108864|0)|0,a=67108863&(c=c+a|0),i+=(s=s+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function w(t,e){this.x=t,this.y=e}Math.imul||(y=m),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):n<63?m(this,t,e):g(this,t,e)},w.prototype.makeRBT=function(t){for(var e=Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},w.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},w.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},w.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var f=u,c=l,d=0;d<s;d++){var p=r[h+d],m=n[h+d],y=r[h+d+s],g=n[h+d+s],w=f*y-c*g;g=f*g+c*y,y=w,r[h+d]=p+y,n[h+d]=m+g,r[h+d+s]=p-y,n[h+d+s]=m-g,d!==a&&(w=u*f-l*c,c=u*c+l*f,f=w)}},w.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},w.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},w.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},w.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n((-8192&o)==0)},w.prototype.stub=function(t){for(var e=Array(t),r=0;r<t;r++)e[r]=0;return e},w.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=Array(n),a=Array(n),u=Array(n),l=Array(n),h=Array(n),f=Array(n),c=r.words;c.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,l,n),this.transform(s,o,a,u,n,i),this.transform(l,o,h,f,n,i);for(var d=0;d<n;d++){var p=a[d]*h[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*h[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,c,o,n,i),this.conjugate(c,o,n),this.normalize13b(c,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=Array(this.length+t.length),g(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=(o/67108864|0)+(s>>>26),this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),0===t&&(this.length=1,this._normSign()),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var i,o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o;if(i-=s,i=Math.max(0,i),r){for(var u=0;u<s;u++)r.words[u]=this.words[u];r.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var h=0|this.words[u];this.words[u]=l<<26-o|h>>>o,l=h&a}return r&&0!==l&&(r.words[r.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return!(this.length<=r)&&!!(this.words[r]&1<<e)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==e&&r++,this.length=Math.min(r,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<<e),0===this.length&&(this.words[0]=0,this.length=1),this._strip())},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return(n("number"==typeof t),n(t<67108864),t<0)?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;o-=67108863&u,a=(o>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r,n=this.length-t.length,i=this.clone(),s=t,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),i.iushln(n),a=0|s.words[s.length-1]);var u=i.length-s.length;if("mod"!==e){(r=new o(null)).length=u+1,r.words=Array(r.length);for(var l=0;l<r.length;l++)r.words[l]=0}var h=i.clone()._ishlnsubmul(s,1,u);0===h.negative&&(i=h,r&&(r.words[u]=1));for(var f=u-1;f>=0;f--){var c=(0|i.words[s.length+f])*67108864+(0|i.words[s.length+f-1]);for(c=Math.min(c/a|0,67108863),i._ishlnsubmul(s,c,f);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(s,1,f),i.isZero()||(i.negative^=1);r&&(r.words[f]=c)}return r&&r._strip(),i._strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(t,e,r){var i,s,a;return(n(!t.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):(this.negative&t.negative)!=0?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||0>this.cmp(t)?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=e.mod.abs(),n=t.abs().iushrn(1),i=1&t.words[0],s=r.cmp(n);if(s<0||1===i&&0===s)return e.div;var a=new o(1);return a.negative=this.negative^t.negative,e.div.iadd(a)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=67108864%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var h=r.clone(),f=e.clone();!e.isZero();){for(var c=0,d=1;(e.words[0]&d)==0&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e,r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var s=new o(1),a=new o(0),u=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var l=0,h=1;(r.words[0]&h)==0&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,c=1;(i.words[0]&c)==0&&f<26;++f,c<<=1);if(f>0)for(i.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);r.cmp(i)>=0?(r.isub(i),s.isub(a)):(i.isub(r),a.isub(s))}return 0>(e=0===r.cmpn(1)?s:a).cmpn(0)&&e.iadd(t),e},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];a+=o,o=a>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return -1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return -1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return -1===this.cmpn(t)},o.prototype.lt=function(t){return -1===this.cmp(t)},o.prototype.lten=function(t){return 0>=this.cmpn(t)},o.prototype.lte=function(t){return 0>=this.cmp(t)},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new B(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function B(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){B.call(this,t),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)}b.prototype._tmp=function(){var t=new o(null);return t.words=Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(M,b),M.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9){t.words[0]=0,t.length=1;return}var i=t.words[9];for(n=10,e.words[e.length++]=4194303&i;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(E,b),i(x,b),i(A,b),A.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=(0|t.words[r])*19+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){var e;if(v[t])return v[t];if("k256"===t)e=new M;else if("p224"===t)e=new E;else if("p192"===t)e=new x;else if("p25519"===t)e=new A;else throw Error("Unknown prime "+t);return v[t]=e,e},B.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},B.prototype._verify2=function(t,e){n((t.negative|e.negative)==0,"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},B.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},B.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},B.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},B.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},B.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},B.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r},B.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},B.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},B.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},B.prototype.isqr=function(t){return this.imul(t,t.clone())},B.prototype.sqr=function(t){return this.mul(t,t)},B.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),c=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<p);var g=this.pow(f,new o(1).iushln(p-y-1));c=c.redMul(g),f=g.redSqr(),d=d.redMul(f),p=y}return c},B.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},B.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var l=e.words[n],h=u-1;h>=0;h--){var f=l>>h&1;if(i!==r[0]&&(i=this.sqr(i)),0===f&&0===s){a=0;continue}s<<=1,s|=f,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)}u=26}return i},B.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},B.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,B),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),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):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},36253:function(t,e,r){"use strict";var n=r(52707).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeUnchecked=e.deserialize=e.serialize=e.BinaryReader=e.BinaryWriter=e.BorshError=e.baseDecode=e.baseEncode=void 0;let l=u(r(54424)),h=u(r(80436)),f=a(r(65496)),c=new("function"!=typeof TextDecoder?f.TextDecoder:TextDecoder)("utf-8",{fatal:!0});e.baseEncode=function(t){return"string"==typeof t&&(t=n.from(t,"utf8")),h.default.encode(n.from(t))},e.baseDecode=function(t){return n.from(h.default.decode(t))};class d extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}e.BorshError=d;class p{constructor(){this.buf=n.alloc(1024),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=n.concat([this.buf,n.alloc(1024)]))}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4}writeU64(t){this.maybeResize(),this.writeBuffer(n.from(new l.default(t).toArray("le",8)))}writeU128(t){this.maybeResize(),this.writeBuffer(n.from(new l.default(t).toArray("le",16)))}writeU256(t){this.maybeResize(),this.writeBuffer(n.from(new l.default(t).toArray("le",32)))}writeU512(t){this.maybeResize(),this.writeBuffer(n.from(new l.default(t).toArray("le",64)))}writeBuffer(t){this.buf=n.concat([n.from(this.buf.subarray(0,this.length)),t,n.alloc(1024)]),this.length+=t.length}writeString(t){this.maybeResize();let e=n.from(t,"utf8");this.writeU32(e.length),this.writeBuffer(e)}writeFixedArray(t){this.writeBuffer(n.from(t))}writeArray(t,e){for(let r of(this.maybeResize(),this.writeU32(t.length),t))this.maybeResize(),e(r)}toArray(){return this.buf.subarray(0,this.length)}}function m(t,e,r){let n=r.value;r.value=function(...t){try{return n.apply(this,t)}catch(t){if(t instanceof RangeError&&["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(t.code)>=0)throw new d("Reached the end of buffer when deserializing");throw t}}}e.BinaryWriter=p;class y{constructor(t){this.buf=t,this.offset=0}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new l.default(t,"le")}readU128(){let t=this.readBuffer(16);return new l.default(t,"le")}readU256(){let t=this.readBuffer(32);return new l.default(t,"le")}readU512(){let t=this.readBuffer(64);return new l.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new d(`Expected buffer length ${t} isn't within bounds`);let e=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,e}readString(){let t=this.readU32(),e=this.readBuffer(t);try{return c.decode(e)}
1catch(t){throw new d(`Error decoding UTF-8 string: ${t}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let e=this.readU32(),r=[];for(let n=0;n<e;++n)r.push(t());return r}}function g(t){return t.charAt(0).toUpperCase()+t.slice(1)}function w(t,e,r,n,i){try{if("string"==typeof n)i[`write${g(n)}`](r);else if(n instanceof Array){if("number"==typeof n[0]){if(r.length!==n[0])throw new d(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);i.writeFixedArray(r)}else if(2===n.length&&"number"==typeof n[1]){if(r.length!==n[1])throw new d(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let e=0;e<n[1];e++)w(t,null,r[e],n[0],i)}else i.writeArray(r,r=>{w(t,e,r,n[0],i)})}else if(void 0!==n.kind)switch(n.kind){case"option":null==r?i.writeU8(0):(i.writeU8(1),w(t,e,r,n.type,i));break;case"map":i.writeU32(r.size),r.forEach((r,o)=>{w(t,e,o,n.key,i),w(t,e,r,n.value,i)});break;default:throw new d(`FieldType ${n} unrecognized`)}else v(t,r,i)}catch(t){throw t instanceof d&&t.addToFieldPath(e),t}}function v(t,e,r){if("function"==typeof e.borshSerialize){e.borshSerialize(r);return}let n=t.get(e.constructor);if(!n)throw new d(`Class ${e.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map(([n,i])=>{w(t,n,e[n],i,r)});else if("enum"===n.kind){let i=e[n.field];for(let o=0;o<n.values.length;++o){let[s,a]=n.values[o];if(s===i){r.writeU8(o),w(t,s,e[s],a,r);break}}}else throw new d(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}function b(t,e,r,n){try{if("string"==typeof r)return n[`read${g(r)}`]();if(r instanceof Array){if("number"==typeof r[0])return n.readFixedArray(r[0]);if("number"!=typeof r[1])return n.readArray(()=>b(t,e,r[0],n));{let e=[];for(let i=0;i<r[1];i++)e.push(b(t,null,r[0],n));return e}}if("option"===r.kind){if(n.readU8())return b(t,e,r.type,n);return}if("map"===r.kind){let i=new Map,o=n.readU32();for(let s=0;s<o;s++){let o=b(t,e,r.key,n),s=b(t,e,r.value,n);i.set(o,s)}return i}return M(t,r,n)}catch(t){throw t instanceof d&&t.addToFieldPath(e),t}}function M(t,e,r){if("function"==typeof e.borshDeserialize)return e.borshDeserialize(r);let n=t.get(e);if(!n)throw new d(`Class ${e.name} is missing in schema`);if("struct"===n.kind){let n={};for(let[i,o]of t.get(e).fields)n[i]=b(t,i,o,r);return new e(n)}if("enum"===n.kind){let i=r.readU8();if(i>=n.values.length)throw new d(`Enum index: ${i} is out of range`);let[o,s]=n.values[i],a=b(t,o,s,r);return new e({[o]:a})}throw new d(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}s([m],y.prototype,"readU8",null),s([m],y.prototype,"readU16",null),s([m],y.prototype,"readU32",null),s([m],y.prototype,"readU64",null),s([m],y.prototype,"readU128",null),s([m],y.prototype,"readU256",null),s([m],y.prototype,"readU512",null),s([m],y.prototype,"readString",null),s([m],y.prototype,"readFixedArray",null),s([m],y.prototype,"readArray",null),e.BinaryReader=y,e.serialize=function(t,e,r=p){let n=new r;return v(t,e,n),n.toArray()},e.deserialize=function(t,e,r,n=y){let i=new n(r),o=M(t,e,i);if(i.offset<r.length)throw new d(`Unexpected ${r.length-i.offset} bytes after deserialized data`);return o},e.deserializeUnchecked=function(t,e,r,n=y){return M(t,e,new n(r))}},34960:function(t,e,r){"use strict";var n=r(29751).Buffer;t.exports=function(t){if(t.length>=255)throw TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==e[s])throw TypeError(o+" is ambiguous");e[s]=i}var a=t.length,u=t.charAt(0),l=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function f(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,i=0,o=0;t[r]===u;)i++,r++;for(var s=(t.length-r)*l+1>>>0,h=new Uint8Array(s);r<t.length;){var f=t.charCodeAt(r);if(f>255)return;var c=e[f];if(255===c)return;for(var d=0,p=s-1;(0!==c||d<o)&&-1!==p;p--,d++)c+=a*h[p]>>>0,h[p]=c%256>>>0,c=c/256>>>0;if(0!==c)throw Error("Non-zero carry");o=d,r++}for(var m=s-o;m!==s&&0===h[m];)m++;var y=n.allocUnsafe(i+(s-m));y.fill(0,0,i);for(var g=i;m!==s;)y[g++]=h[m++];return y}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var l=(s-o)*h+1>>>0,f=new Uint8Array(l);o!==s;){for(var c=e[o],d=0,p=l-1;(0!==c||d<i)&&-1!==p;p--,d++)c+=256*f[p]>>>0,f[p]=c%a>>>0,c=c/a>>>0;if(0!==c)throw Error("Non-zero carry");i=d,o++}for(var m=l-i;m!==l&&0===f[m];)m++;for(var y=u.repeat(r);m<l;++m)y+=t.charAt(f[m]);return y},decodeUnsafe:f,decode:function(t){var e=f(t);if(e)return e;throw Error("Non-base"+a+" character")}}}},80436:function(t,e,r){var n=r(34960);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},48529:function(t){"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}
1function o(t,e,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new i(n,o||t,s),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],a]:t._events[u].push(a):(t._events[u]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),a.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var u,l,h=this._events[a],f=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),f){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,n),!0;case 4:return h.fn.call(h.context,e,n,i),!0;case 5:return h.fn.call(h.context,e,n,i,o),!0;case 6:return h.fn.call(h.context,e,n,i,o,s),!0}for(l=1,u=Array(f-1);l<f;l++)u[l-1]=arguments[l];h.fn.apply(h.context,u)}else{var c,d=h.length;for(l=0;l<d;l++)switch(h[l].once&&this.removeListener(t,h[l].fn,void 0,!0),f){case 1:h[l].fn.call(h[l].context);break;case 2:h[l].fn.call(h[l].context,e);break;case 3:h[l].fn.call(h[l].context,e,n);break;case 4:h[l].fn.call(h[l].context,e,n,i);break;default:if(!u)for(c=1,u=Array(f-1);c<f;c++)u[c-1]=arguments[c];h[l].fn.apply(h[l].context,u)}}return!0},a.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var u=0,l=[],h=a.length;u<h;u++)(a[u].fn!==e||i&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a},11651:function(t,e,r){"use strict";let n=r(69681).v4,i=r(21457),o=function(t,e){if(!(this instanceof o))return new o(t,e);e||(e={}),this.options={reviver:void 0!==e.reviver?e.reviver:null,replacer:void 0!==e.replacer?e.replacer:null,generator:void 0!==e.generator?e.generator:function(){return n()},version:void 0!==e.version?e.version:2,notificationIdNull:"boolean"==typeof e.notificationIdNull&&e.notificationIdNull},this.callServer=t};t.exports=o,o.prototype.request=function(t,e,r,n){let o;let s=this,a=null,u=Array.isArray(t)&&"function"==typeof e;if(1===this.options.version&&u)throw TypeError("JSON-RPC 1.0 does not support batching");let l=!u&&t&&"object"==typeof t&&"function"==typeof e;if(u||l)n=e,a=t;else{"function"==typeof r&&(n=r,r=void 0);let o="function"==typeof n;try{a=i(t,e,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(t){if(o){n(t);return}throw t}if(!o)return a}try{o=JSON.stringify(a,this.options.replacer)}catch(t){n(t);return}return this.callServer(o,function(t,e){s._parseResponse(t,e,n)}),a},o.prototype._parseResponse=function(t,e,r){let n;if(t){r(t);return}if(!e){r();return}try{n=JSON.parse(e,this.options.reviver)}catch(t){r(t);return}if(3===r.length){if(Array.isArray(n)){let t=function(t){return void 0!==t.error};r(null,n.filter(t),n.filter(function(e){return!t(e)}));return}r(null,n.error,n.result);return}r(null,n)}},21457:function(t,e,r){"use strict";let n=r(69681).v4;t.exports=function(t,e,r,i){if("string"!=typeof t)throw TypeError(t+" must be a string");let o="number"==typeof(i=i||{}).version?i.version:2;if(1!==o&&2!==o)throw TypeError(o+" must be 1 or 2");let s={method:t};if(2===o&&(s.jsonrpc="2.0"),e){if("object"!=typeof e&&!Array.isArray(e))throw TypeError(e+" must be an object, array or omitted");s.params=e}if(void 0===r){let t="function"==typeof i.generator?i.generator:function(){return n()};s.id=t(s,i)}else 2===o&&null===r?i.notificationIdNull&&(s.id=null):s.id=r;return s}},29751:function(t,e,r){var n=r(52707),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return n.SlowBuffer(t)}},65496:function(t,e){"use strict";function r(t,e,r){return e<=t&&t<=r}function n(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function i(t){this.tokens=[].slice.call(t)}function o(t,e){if(t)throw TypeError("Decoder error");return e||65533}
vendor: 4,324 bytes, line 1
1i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(;t.length;)this.tokens.push(t.shift());else this.tokens.push(t)}};var s="utf-8";function a(t,e){if(!(this instanceof a))return new a(t,e);if((t=void 0!==t?String(t).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");e=n(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function u(t,e){if(!(this instanceof u))return new u(t,e);if((t=void 0!==t?String(t).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");e=n(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function l(t){var e=t.fatal,n=0,i=0,s=0,a=128,u=191;this.handler=function(t,l){if(-1===l&&0!==s)return s=0,o(e);if(-1===l)return -1;if(0===s){if(r(l,0,127))return l;if(r(l,194,223))s=1,n=l-192;else if(r(l,224,239))224===l&&(a=160),237===l&&(u=159),s=2,n=l-224;else{if(!r(l,240,244))return o(e);240===l&&(a=144),244===l&&(u=143),s=3,n=l-240}return n<<=6*s,null}if(!r(l,a,u))return n=s=i=0,a=128,u=191,t.prepend(l),o(e);if(a=128,u=191,i+=1,n+=l-128<<6*(s-i),i!==s)return null;var h=n;return n=s=i=0,h}}function h(t){t.fatal,this.handler=function(t,e){if(-1===e)return -1;if(r(e,0,127))return e;r(e,128,2047)?(n=1,i=192):r(e,2048,65535)?(n=2,i=224):r(e,65536,1114111)&&(n=3,i=240);for(var n,i,o=[(e>>6*n)+i];n>0;){var s=e>>6*(n-1);o.push(128|63&s),n-=1}return o}}a.prototype={decode:function(t,e){r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=n(e),this._streaming||(this._decoder=new l({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!e.stream;for(var r,o,s=new i(r),a=[];!s.endOfStream()&&-1!==(o=this._decoder.handler(s,s.read()));)null!==o&&(Array.isArray(o)?a.push.apply(a,o):a.push(o));if(!this._streaming){do{if(-1===(o=this._decoder.handler(s,s.read())))break;if(null===o)continue;Array.isArray(o)?a.push.apply(a,o):a.push(o)}while(!s.endOfStream());this._decoder=null}return!a.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0,a.shift()):this._BOMseen=!0),function(t){for(var e="",r=0;r<t.length;++r){var n=t[r];n<=65535?e+=String.fromCharCode(n):(n-=65536,e+=String.fromCharCode((n>>10)+55296,(1023&n)+56320))}return e}(a)}},u.prototype={encode:function(t,e){t=t?String(t):"",e=n(e),this._streaming||(this._encoder=new h(this._options)),this._streaming=!!e.stream;for(var r,o=[],s=new i(function(t){for(var e=String(t),r=e.length,n=0,i=[];n<r;){var o=e.charCodeAt(n);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319){if(n===r-1)i.push(65533);else{var s=t.charCodeAt(n+1);if(56320<=s&&s<=57343){var a=1023&o,u=1023&s;i.push(65536+(a<<10)+u),n+=1}else i.push(65533)}}n+=1}return i}(t));!s.endOfStream()&&-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?o.push.apply(o,r):o.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?o.push.apply(o,r):o.push(r);this._encoder=null}return new Uint8Array(o)}},e.TextEncoder=u,e.TextDecoder=a},69681:function(t,e,r){"use strict";r.d(e,{v4:function(){return l}});for(var n,i=new Uint8Array(16),o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase();if(!("string"==typeof r&&o.test(r)))throw TypeError("Stringified UUID is invali
1d");return r},l=function(t,e,r){var o=(t=t||{}).random||(t.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){r=r||0;for(var s=0;s<16;++s)e[r+s]=o[s];return e}return u(o)}},75202:function(t,e,r){"use strict";r.d(e,{A1:function(){return u},D1:function(){return w},Mx:function(){return y},N6:function(){return g},rO:function(){return b},xg:function(){return a}});var n=r(99026),i=r(60598);let o=BigInt(0),s=BigInt(1);function a(t,e){let r=e.negate();return t?r:e}function u(t,e){let r=(0,i.Eg)(t.Fp,e.map(t=>t.Z));return e.map((e,n)=>t.fromAffine(e.toAffine(r[n])))}function l(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw Error("invalid window size, expected [1.."+e+"], got W="+t)}function h(t,e){l(t,e);let r=Math.ceil(e/t)+1,i=2**(t-1),o=2**t;return{windows:r,windowSize:i,mask:(0,n.dQ)(t),maxNumber:o,shiftBy:BigInt(t)}}function f(t,e,r){let{windowSize:n,mask:i,maxNumber:o,shiftBy:a}=r,u=Number(t&i),l=t>>a;u>n&&(u-=o,l+=s);let h=e*n,f=h+Math.abs(u)-1;return{nextN:l,offset:f,isZero:0===u,isNeg:u<0,isNegF:e%2!=0,offsetF:h}}let c=new WeakMap,d=new WeakMap;function p(t){return d.get(t)||1}function m(t){if(t!==o)throw Error("invalid wNAF")}class y{constructor(t,e){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=e}_unsafeLadder(t,e,r=this.ZERO){let n=t;for(;e>o;)e&s&&(r=r.add(n)),n=n.double(),e>>=s;return r}precomputeWindow(t,e){let{windows:r,windowSize:n}=h(e,this.bits),i=[],o=t,s=o;for(let t=0;t<r;t++){s=o,i.push(s);for(let t=1;t<n;t++)s=s.add(o),i.push(s);o=s.double()}return i}wNAF(t,e,r){if(!this.Fn.isValid(r))throw Error("invalid scalar");let n=this.ZERO,i=this.BASE,o=h(t,this.bits);for(let t=0;t<o.windows;t++){let{nextN:s,offset:u,isZero:l,isNeg:h,isNegF:c,offsetF:d}=f(r,t,o);r=s,l?i=i.add(a(c,e[d])):n=n.add(a(h,e[u]))}return m(r),{p:n,f:i}}wNAFUnsafe(t,e,r,n=this.ZERO){let i=h(t,this.bits);for(let t=0;t<i.windows&&r!==o;t++){let{nextN:o,offset:s,isZero:a,isNeg:u}=f(r,t,i);if(r=o,!a){let t=e[s];n=n.add(u?t.negate():t)}}return m(r),n}getPrecomputes(t,e,r){let n=c.get(e);return n||(n=this.precomputeWindow(e,t),1!==t&&("function"==typeof r&&(n=r(n)),c.set(e,n))),n}cached(t,e,r){let n=p(t);return this.wNAF(n,this.getPrecomputes(n,t,r),e)}unsafe(t,e,r,n){let i=p(t);return 1===i?this._unsafeLadder(t,e,n):this.wNAFUnsafe(i,this.getPrecomputes(i,t,r),e,n)}createCache(t,e){l(e,this.bits),d.set(t,e),c.delete(t)}hasCache(t){return 1!==p(t)}}function g(t,e,r,n){let i=e,a=t.ZERO,u=t.ZERO;for(;r>o||n>o;)r&s&&(a=a.add(i)),n&s&&(u=u.add(i)),i=i.double(),r>>=s,n>>=s;return{p1:a,p2:u}}function w(t,e,r,i){!function(t,e){if(!Array.isArray(t))throw Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)})}(r,t),function(t,e){if(!Array.isArray(t))throw Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw Error("invalid scalar at index "+r)})}(i,e);let o=r.length,s=i.length;if(o!==s)throw Error("arrays of points and scalars must have equal length");let a=t.ZERO,u=(0,n.Dd)(BigInt(o)),l=1;u>12?l=u-3:u>4?l=u-2:u>0&&(l=2);let h=(0,n.dQ)(l),f=Array(Number(h)+1).fill(a),c=Math.floor((e.BITS-1)/l)*l,d=a;for(let t=c;t>=0;t-=l){f.fill(a);for(let e=0;e<s;e++){let n=Number(i[e]>>BigInt(t)&h);f[n]=f[n].add(r[e])}let e=a;for(let t=f.length-1,r=a;t>0;t--)r=r.add(f[t]),e=e.add(r);if(d=d.add(e),0!==t)for(let t=0;t<l;t++)d=d.double()}return d}function v(t,e,r){if(!e)return(0,i.gN)(t,{isLE:r});if(e.ORDER!==t)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.OP)(e),e}function b(t,e,r={},n){if(void 0===n&&(n="edwards"===t),!e||"object"!=typeof e)throw Error(`expected valid ${t} CURVE object`);for(let t of["p","n","h"]){let r=e[t];if(!("bigint"==typeof r&&r>o))throw Error(`CURVE.${t} must be positive bigint`)}let i=v(e.p,r.Fp,n),s=v(e.n,r.Fn,n);for(let r of["Gx","Gy","a","weierstrass"===t?"b":"d"])if(!i.isValid(e[r]))throw Error(`CURVE.${r} must be valid field element of CURVE.Fp`);
1return{CURVE:e=Object.freeze(Object.assign({},e)),Fp:i,Fn:s}}},60598:function(t,e,r){"use strict";r.d(e,{Eg:function(){return B},OP:function(){return A},PS:function(){return k},Tu:function(){return E},Us:function(){return O},gN:function(){return I},kK:function(){return _},oA:function(){return y},wQ:function(){return m}});var n=r(99026),i=r(69898);let o=BigInt(0),s=BigInt(1),a=BigInt(2),u=BigInt(3),l=BigInt(4),h=BigInt(5),f=BigInt(7),c=BigInt(8),d=BigInt(9),p=BigInt(16);function m(t,e){let r=t%e;return r>=o?r:e+r}function y(t,e,r){let n=t;for(;e-- >o;)n*=n,n%=r;return n}function g(t,e){if(t===o)throw Error("invert: expected non-zero number");if(e<=o)throw Error("invert: expected positive modulus, got "+e);let r=m(t,e),n=e,i=o,a=s,u=s,l=o;for(;r!==o;){let t=n/r,e=n%r,o=i-u*t,s=a-l*t;n=r,r=e,i=u,a=l,u=o,l=s}if(n!==s)throw Error("invert: does not exist");return m(i,e)}function w(t,e,r){if(!t.eql(t.sqr(e),r))throw Error("Cannot find square root")}function v(t,e){let r=(t.ORDER+s)/l,n=t.pow(e,r);return w(t,n,e),n}function b(t,e){let r=(t.ORDER-h)/c,n=t.mul(e,a),i=t.pow(n,r),o=t.mul(e,i),s=t.mul(t.mul(o,a),i),u=t.mul(
vendor: 4,553 bytes, line 1
1o,t.sub(s,t.ONE));return w(t,u,e),u}function M(t){if(t<u)throw Error("sqrt is not defined for small field");let e=t-s,r=0;for(;e%a===o;)e/=a,r++;let n=a,i=I(t);for(;1===S(i,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return v;let l=i.pow(n,e),h=(e+s)/a;return function(t,n){if(t.is0(n))return n;if(1!==S(t,n))throw Error("Cannot find square root");let i=r,o=t.mul(t.ONE,l),a=t.pow(n,e),u=t.pow(n,h);for(;!t.eql(a,t.ONE);){if(t.is0(a))return t.ZERO;let e=1,r=t.sqr(a);for(;!t.eql(r,t.ONE);)if(e++,r=t.sqr(r),e===i)throw Error("Cannot find square root");let n=s<<BigInt(i-e-1),l=t.pow(o,n);i=e,o=t.sqr(l),a=t.mul(a,o),u=t.mul(u,l)}return u}}let E=(t,e)=>(m(t,e)&s)===s,x=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function A(t){let e=x.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n.fA)(t,e),t}function B(t,e,r=!1){let n=Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((e,r,i)=>t.is0(r)?e:(n[i]=e,t.mul(e,r)),t.ONE),o=t.inv(i);return e.reduceRight((e,r,i)=>t.is0(r)?e:(n[i]=t.mul(e,n[i]),t.mul(e,r)),o),n}function S(t,e){let r=(t.ORDER-s)/a,n=t.pow(e,r),i=t.eql(n,t.ONE),o=t.eql(n,t.ZERO),u=t.eql(n,t.neg(t.ONE));if(!i&&!o&&!u)throw Error("invalid Legendre symbol result");return i?1:o?0:-1}function _(t,e){void 0!==e&&(0,i.k8)(e);let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function I(t,e,r=!1,i={}){let a,y,E,x;if(t<=o)throw Error("invalid field: expected ORDER > 0, got "+t);let A=!1;if("object"==typeof e&&null!=e){if(i.sqrt||r)throw Error("cannot specify opts in two arguments");e.BITS&&(y=e.BITS),e.sqrt&&(E=e.sqrt),"boolean"==typeof e.isLE&&(r=e.isLE),"boolean"==typeof e.modFromBytes&&(A=e.modFromBytes),x=e.allowedLengths}else"number"==typeof e&&(y=e),i.sqrt&&(E=i.sqrt);let{nBitLength:S,nByteLength:T}=_(t,y);if(T>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let k=Object.freeze({ORDER:t,isLE:r,BITS:S,BYTES:T,MASK:(0,n.dQ)(S),ZERO:o,ONE:s,allowedLengths:x,create:e=>m(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error("invalid field element: expected bigint, got "+typeof e);return o<=e&&e<t},is0:t=>t===o,isValidNot0:t=>!k.is0(t)&&k.isValid(t),isOdd:t=>(t&s)===s,neg:e=>m(-e,t),eql:(t,e)=>t===e,sqr:e=>m(e*e,t),add:(e,r)=>m(e+r,t),sub:(e,r)=>m(e-r,t),mul:(e,r)=>m(e*r,t),pow:(t,e)=>(function(t,e,r){if(r<o)throw Error("invalid exponent, negatives unsupported");if(r===o)return t.ONE;if(r===s)return e;let n=t.ONE,i=e;for(;r>o;)r&s&&(n=t.mul(n,i)),i=t.sqr(i),r>>=s;return n})(k,t,e),div:(e,r)=>m(e*g(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>g(e,t),sqrt:E||(e=>(!a&&(a=t%l===u?v:t%c===h?b:t%p===d?function(t){let e=I(t),r=M(t),n=r(e,e.neg(e.ONE)),i=r(e,n),o=r(e,e.neg(n)),s=(t+f)/p;return(t,e)=>{let r=t.pow(e,s),a=t.mul(r,n),u=t.mul(r,i),l=t.mul(r,o),h=t.eql(t.sqr(a),e),f=t.eql(t.sqr(u),e);r=t.cmov(r,a,h),a=t.cmov(l,u,f);let c=t.eql(t.sqr(a),e),d=t.cmov(r,a,c);return w(t,d,e),d}}(t):M(t)),a(k,e))),toBytes:t=>r?(0,n.S5)(t,T):(0,n.tL)(t,T),fromBytes:(e,i=!0)=>{if(x){if(!x.includes(e.length)||e.length>T)throw Error("Field.fromBytes: expected "+x+" bytes, got "+e.length);let t=new Uint8Array(T);t.set(e,r?0:t.length-e.length),e=t}if(e.length!==T)throw Error("Field.fromBytes: expected "+T+" bytes, got "+e.length);let o=r?(0,n.ty)(e):(0,n.Hv)(e);if(A&&(o=m(o,t)),!i&&!k.isValid(o))throw Error("invalid field element: outside of range 0..ORDER");return o},invertBatch:t=>B(k,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(k)}function T(t){if("bigint"!=typeof t)throw Error("field order must be bigint");return Math.ceil(t.toString(2).length/8)}function k(t){let e=T(t);return e+Math.ceil(e/2)}function O(t,e,r=!1){let i=t.length,o=T(e),a=k(e);if(i<16||i<a||i>1024)throw Error("expected "+a+"-1024 bytes of input, got "+i);let u=m(r?(0,n.ty)(t):(0,n.Hv)(t),e-s)+s;return r?(0,n.S5)(u,o):(0,n.tL)(u,o)}},10326:function(t,e,r){"use strict";r.d(e,{UN:function(){return B}});var n=r(31565),i=r(69898),o=r(75202),s=r(99026),a=r(60598);let u=BigInt(0),l=BigInt(1),h=BigInt(2),f=BigInt(8);class c{constructor(t){this.ep=t}static fromBytes(t){(0,s.EQ)()}static fromHex(t){(0,s.EQ)()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(t){return this.ep.toAffine(t)}toHex(){return(0,i.ci)(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}
1add(t){return this.assertSame(t),this.init(this.ep.add(t.ep))}subtract(t){return this.assertSame(t),this.init(this.ep.subtract(t.ep))}multiply(t){return this.init(this.ep.multiply(t))}multiplyUnsafe(t){return this.init(this.ep.multiplyUnsafe(t))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(t,e){return this.init(this.ep.precompute(t,e))}toRawBytes(){return this.toBytes()}}function d(t){if(!Number.isSafeInteger(t))throw Error("number expected")}(0,i.iY)("HashToScalar-");let p=BigInt(0),m=BigInt(1),y=BigInt(2);BigInt(3);let g=BigInt(5),w=BigInt(8),v=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),b={p:v,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:w,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")},M=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function E(t,e){let r=(0,a.wQ)(e*e*e,v),n=function(t){let e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),o=t*t%v*t%v,s=(0,a.oA)(o,y,v)*o%v,u=(0,a.oA)(s,m,v)*t%v,l=(0,a.oA)(u,g,v)*u%v,h=(0,a.oA)(l,e,v)*l%v,f=(0,a.oA)(h,r,v)*h%v,c=(0,a.oA)(f,n,v)*f%v,d=(0,a.oA)(c,i,v)*c%v,p=(0,a.oA)(d,i,v)*c%v,w=(0,a.oA)(p,e,v)*l%v;return{pow_p_5_8:(0,a.oA)(w,y,v)*t%v,b2:o}}(t*(0,a.wQ)(r*r*e,v)).pow_p_5_8,i=(0,a.wQ)(t*r*n,v),o=(0,a.wQ)(e*i*i,v),s=i,u=(0,a.wQ)(i*M,v),l=o===t,h=o===(0,a.wQ)(-t,v),f=o===(0,a.wQ)(-t*M,v);return l&&(i=s),(h||f)&&(i=u),(0,a.Tu)(i,v)&&(i=(0,a.wQ)(-i,v)),{isValid:l||h,value:i}}let x=(0,a.gN)(b.p,{isLE:!0}),A=(0,a.gN)(b.n,{isLE:!0}),B=function(t){let{CURVE:e,curveOpts:r,hash:n,eddsaOpts:c}=function(t){let e={a:t.a,d:t.d,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r={Fp:t.Fp,Fn:(0,a.gN)(e.n,t.nBitLength,!0),uvRatio:t.uvRatio},n={randomBytes:t.randomBytes,adjustScalarBytes:t.adjustScalarBytes,domain:t.domain,prehash:t.prehash,mapToCurve:t.mapToCurve};return{CURVE:e,curveOpts:r,hash:t.hash,eddsaOpts:n}}(t);return function(t,e){let r=e.Point;return Object.assign({},e,{ExtendedPoint:r,CURVE:t,nBitLength:r.Fn.BITS,nByteLength:r.Fn.BYTES})}(t,function(t,e,r={}){if("function"!=typeof e)throw Error('"hash" function param is required');(0,s.fA)(r,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});let{prehash:n}=r,{BASE:o,Fp:a,Fn:u}=t,h=r.randomBytes||i.O6,f=r.adjustScalarBytes||(t=>t),c=r.domain||((t,e,r)=>{if((0,s.po)(r,"phflag"),e.length||r)throw Error("Contexts/pre-hash are not supported");return t});function d(t){return u.create((0,s.ty)(t))}function p(t){let{head:r,prefix:n,scalar:i}=function(t){let r=v.secretKey;t=(0,s.ql)("private key",t,r);let n=(0,s.ql)("hashed private key",e(t),2*r),i=f(n.slice(0,r)),o=n.slice(r,2*r),a=d(i);return{head:i,prefix:o,scalar:a}}(t),a=o.multiply(i),u=a.toBytes();return{head:r,prefix:n,scalar:i,point:a,pointBytes:u}}function m(t){return p(t).pointBytes}function y(t=Uint8Array.of(),...r){return d(e(c((0,i.eV)(...r),(0,s.ql)("context",t),!!n)))}let g={zip215:!0},w=a.BYTES,v={secretKey:w,publicKey:w,signature:2*w,seed:w};function b(t=h(v.seed)){return(0,s.GB)(t,v.seed,"seed")}let M={getExtendedPublicKey:p,randomSecretKey:b,isValidSecretKey:function(t){return(0,i._t)(t)&&t.length===u.BYTES},isValidPublicKey:function(e,r){try{return!!t.fromBytes(e,r)}catch(t){return!1}},toMontgomery(e){let{y:r}=t.fromBytes(e),n=v.publicKey,i=32===n;if(!i&&57!==n)throw Error("only defined for 25519 and 448");let o=i?a.div(l+r,l-r):a.div(r-l,r+l);return a.toBytes(o)},toMontgomerySecret(t){let r=v.secretKey;return(0,s.GB)(t,r),f(e(t.subarray(0,r))).subarray(0,r)},randomPrivateKey:b,precompute:(e=8,r=t.BASE)=>r.precompute(e,!1)};return Object.freeze({keygen:function(t){let e=M.randomSecretKey(t);return{secretKey:e,publicKey:m(e)}},getPublicKey:m,sign:function(t,e,r={}){t=(0,s.ql)("message",t),n&&(t=n(t));let{prefix:a,scalar:l,pointBytes:h}=p(e),f=y(r.context,a,t),c=o.multiply(f).toBytes(),d=y(r.context,c,h,t),m=u.create(f+d*l);
1if(!u.isValid(m))throw Error("sign failed: invalid s");let g=(0,i.eV)(c,u.toBytes(m));return(0,s.GB)(g,v.signature,"result")},verify:function(e,r,i,a=g){let u,l,h;let{context:f,zip215:c}=a,d=v.signature;e=(0,s.ql)("signature",e,d),r=(0,s.ql)("message",r),i=(0,s.ql)("publicKey",i,v.publicKey),void 0!==c&&(0,s.po)(c,"zip215"),n&&(r=n(r));let p=d/2,m=e.subarray(0,p),w=(0,s.ty)(e.subarray(p,d));try{u=t.fromBytes(i,c),l=t.fromBytes(m,c),h=o.multiplyUnsafe(w)}catch(t){return!1}if(!c&&u.isSmallOrder())return!1;let b=y(f,l.toBytes(),u.toBytes(),r);return l.add(u.multiplyUnsafe(b)).subtract(h).clearCofactor().is0()},utils:M,Point:t,lengths:v})}(function(t,e={}){let r=(0,o.rO)("edwards",t,e,e.FpFnLE),{Fp:n,Fn:a}=r,c=r.CURVE,{h:d}=c;(0,s.fA)(e,{},{uvRatio:"function"});let p=h<<BigInt(8*a.BYTES)-l,m=t=>n.create(t),y=e.uvRatio||((t,e)=>{try{return{isValid:!0,value:n.sqrt(n.div(t,e))}}catch(t){return{isValid:!1,value:u}}});if(!function(t,e,r,n){let i=t.sqr(r),o=t.sqr(n),s=t.add(t.mul(e.a,i),o),a=t.add(t.ONE,t.mul(e.d,t.mul(i,o)));return t.eql(s,a)}(n,c,c.Gx,c.Gy))throw Error("bad curve params: generator point");function g(t,e,r=!1){let n=r?l:u;return(0,s.Fy)("coordinate "+t,e,n,p),e}function w(t){if(!(t instanceof M))throw Error("ExtendedPoint expected")}let v=(0,s.H9)((t,e)=>{let{X:r,Y:i,Z:o}=t,s=t.is0();null==e&&(e=s?f:n.inv(o));let a=m(r*e),h=m(i*e),c=n.mul(o,e);if(s)return{x:u,y:l};if(c!==l)throw Error("invZ was invalid");return{x:a,y:h}}),b=(0,s.H9)(t=>{let{a:e,d:r}=c;if(t.is0())throw Error("bad point: ZERO");let{X:n,Y:i,Z:o,T:s}=t,a=m(n*n),u=m(i*i),l=m(o*o),h=m(l*l),f=m(a*e);if(m(l*m(f+u))!==m(h+m(r*m(a*u))))throw Error("bad point: equation left != right (1)");if(m(n*i)!==m(o*s))throw Error("bad point: equation left != right (2)");return!0});class M{constructor(t,e,r,n){this.X=g("x",t),this.Y=g("y",e),this.Z=g("z",r,!0),this.T=g("t",n),Object.freeze(this)}static CURVE(){return c}static fromAffine(t){if(t instanceof M)throw Error("extended point not allowed");let{x:e,y:r}=t||{};return g("x",e),g("y",r),new M(e,r,l,m(e*r))}static fromBytes(t,e=!1){let r=n.BYTES,{a:i,d:o}=c;t=(0,s.HV)((0,s.GB)(t,r,"point")),(0,s.po)(e,"zip215");let a=(0,s.HV)(t),h=t[r-1];a[r-1]=-129&h;let f=(0,s.ty)(a),d=e?p:n.ORDER;(0,s.Fy)("point.y",f,u,d);let g=m(f*f),{isValid:w,value:v}=y(m(g-l),m(o*g-i));if(!w)throw Error("bad point: invalid y coordinate");let b=(v&l)===l,E=(128&h)!=0;if(!e&&v===u&&E)throw Error("bad point: x=0 and x_0=1");return E!==b&&(v=m(-v)),M.fromAffine({x:v,y:f})}static fromHex(t,e=!1){return M.fromBytes((0,s.ql)("point",t),e)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(t=8,e=!0){return E.createCache(this,t),e||this.multiply(h),this}assertValidity(){b(this)}equals(t){w(t);let{X:e,Y:r,Z:n}=this,{X:i,Y:o,Z:s}=t,a=m(e*s),u=m(i*n),l=m(r*s),h=m(o*n);return a===u&&l===h}is0(){return this.equals(M.ZERO)}negate(){return new M(m(-this.X),this.Y,this.Z,m(-this.T))}double(){let{a:t}=c,{X:e,Y:r,Z:n}=this,i=m(e*e),o=m(r*r),s=m(h*m(n*n)),a=m(t*i),u=e+r,l=m(m(u*u)-i-o),f=a+o,d=f-s,p=a-o,y=m(l*d),g=m(f*p),w=m(l*p);return new M(y,g,m(d*f),w)}add(t){w(t);let{a:e,d:r}=c,{X:n,Y:i,Z:o,T:s}=this,{X:a,Y:u,Z:l,T:h}=t,f=m(n*a),d=m(i*u),p=m(s*r*h),y=m(o*l),g=m((n+i)*(a+u)-f-d),v=y-p,b=y+p,E=m(d-e*f),x=m(g*v),A=m(b*E),B=m(g*E);return new M(x,A,m(v*b),B)}subtract(t){return this.add(t.negate())}multiply(t){if(!a.isValidNot0(t))throw Error("invalid scalar: expected 1 <= sc < curve.n");let{p:e,f:r}=E.cached(this,t,t=>(0,o.A1)(M,t));return(0,o.A1)(M,[e,r])[0]}multiplyUnsafe(t,e=M.ZERO){if(!a.isValid(t))throw Error("invalid scalar: expected 0 <= sc < curve.n");return t===u?M.ZERO:this.is0()||t===l?this:E.unsafe(this,t,t=>(0,o.A1)(M,t),e)}isSmallOrder(){return this.multiplyUnsafe(d).is0()}isTorsionFree(){return E.unsafe(this,c.n).is0()}toAffine(t){return v(this,t)}clearCofactor(){return d===l?this:this.multiplyUnsafe(d)}toBytes(){let{x:t,y:e}=this.toAffine(),r=n.toBytes(e);return r[r.length-1]|=t&l?128:0,r}toHex(){return(0,i.ci)(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(t){return(0,o.A1)(M,t)}static msm(t,e){return(0,o.D1)(M,a,t,e)}
1_setWindowSize(t){this.precompute(t)}toRawBytes(){return this.toBytes()}}M.BASE=new M(c.Gx,c.Gy,l,m(c.Gx*c.Gy)),M.ZERO=new M(u,l,l,u),M.Fp=n,M.Fn=a;let E=new o.Mx(M,a.BITS);return M.BASE.precompute(8),M}(e,r),n,c))}({...b,Fp:x,hash:n.o,adjustScalarBytes:function(t){return t[0]&=248,t[31]&=127,t[31]|=64,t},uvRatio:E}),S=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),_=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),I=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),T=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),k=t=>E(m,t),O=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),U=t=>B.Point.Fp.create((0,s.ty)(t)&O);function R(t){let{d:e}=b,r=t=>x.create(t),n=r(M*t*t),i=r((n+m)*I),o=BigInt(-1),s=r((o-e*n)*r(n+e)),{isValid:u,value:l}=E(i,s),h=r(l*t);(0,a.Tu)(h,v)||(h=r(-h)),u||(l=h),u||(o=n);let f=r(o*(n-m)*T-s),c=l*l,d=r((l+l)*s),p=r(f*S),y=r(m-c),g=r(m+c);return new B.Point(r(d*g),r(y*p),r(p*g),r(d*y))}class L extends c{constructor(t){super(t)}static fromAffine(t){return new L(B.Point.fromAffine(t))}assertSame(t){if(!(t instanceof L))throw Error("RistrettoPoint expected")}init(t){return new L(t)}static hashToCurve(t){return function(t){(0,i.gk)(t,64);let e=R(U(t.subarray(0,32))),r=R(U(t.subarray(32,64)));return new L(e.add(r))}((0,s.ql)("ristrettoHash",t,64))}static fromBytes(t){(0,i.gk)(t,32);let{a:e,d:r}=b,n=t=>x.create(t),o=U(t);if(!(0,s.Wd)(x.toBytes(o),t)||(0,a.Tu)(o,v))throw Error("invalid ristretto255 encoding 1");let u=n(o*o),l=n(m+e*u),h=n(m-e*u),f=n(l*l),c=n(h*h),d=n(e*r*f-c),{isValid:y,value:g}=k(n(d*c)),w=n(g*h),M=n(g*w*d),E=n((o+o)*w);(0,a.Tu)(E,v)&&(E=n(-E));let A=n(l*M),S=n(E*A);if(!y||(0,a.Tu)(S,v)||A===p)throw Error("invalid ristretto255 encoding 2");return new L(new B.Point(E,A,m,S))}static fromHex(t){return L.fromBytes((0,s.ql)("ristrettoHex",t,32))}static msm(t,e){return(0,o.D1)(L,B.Point.Fn,t,e)}toBytes(){let t,{X:e,Y:r,Z:n,T:i}=this.ep,o=t=>x.create(t),s=o(o(n+r)*o(n-r)),u=o(e*r),l=o(u*u),{value:h}=k(o(s*l)),f=o(h*s),c=o(h*u),d=o(f*c*i);if((0,a.Tu)(i*d,v)){let n=o(r*M),i=o(e*M);e=n,r=i,t=o(f*_)}else t=c;(0,a.Tu)(e*d,v)&&(r=o(-r));let p=o((n-r)*t);return(0,a.Tu)(p,v)&&(p=o(-p)),x.toBytes(p)}equals(t){this.assertSame(t);let{X:e,Y:r}=this.ep,{X:n,Y:i}=t.ep,o=t=>x.create(t),s=o(e*i)===o(r*n),a=o(r*i)===o(e*n);return s||a}is0(){return this.equals(L.ZERO)}}L.BASE=new L(B.Point.BASE),L.ZERO=new L(B.Point.ZERO),L.Fp=x,L.Fn=A},28478:function(t,e,r){"use strict";r.d(e,{kA:function(){return _}});var n=r(31565),i=r(69898);class o extends i.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,i.z3)(t);let r=(0,i.O0)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t<o.length;t++)o[t]^=54;this.iHash.update(o),this.oHash=t.create();for(let t=0;t<o.length;t++)o[t]^=106;this.oHash.update(o),(0,i.ru)(o)}update(t){return(0,i.$h)(this),this.iHash.update(t),this}digestInto(t){(0,i.$h)(this),(0,i.gk)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let s=(t,e,r)=>new o(t,e).update(r).digest();s.create=(t,e)=>new o(t,e);var a=r(99026),u=r(75202),l=r(60598);let h=(t,e)=>(t+(t>=0?e:-e)/g)/e;function f(t){if(!["compact","recovered","der"].includes(t))throw Error('Signature format must be "compact", "recovered", or "der"');return t}function c(t,e){let r={};for(let n of Object.keys(e))r[n]=void 0===t[n]?e[n]:t[n];return(0,a.po)(r.lowS,"lowS"),(0,a.po)(r.prehash,"prehash"),void 0!==r.format&&f(r.format),r}
vendor: 19,550 bytes, line 1
1class d extends Error{constructor(t=""){super(t)}}let p={Err:d,_tlv:{encode:(t,e)=>{let{Err:r}=p;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(1&e.length)throw new r("tlv.encode: unpadded data");let n=e.length/2,i=(0,a.uz)(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?(0,a.uz)(i.length/2|128):"";return(0,a.uz)(t)+o+i+e},decode(t,e){let{Err:r}=p,n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let i=e[n++],o=0;if(128&i){let t=127&i;if(!t)throw new r("tlv.decode(long): indefinite length not supported");if(t>4)throw new r("tlv.decode(long): byte length is too big");let s=e.subarray(n,n+t);if(s.length!==t)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let t of s)o=o<<8|t;if(n+=t,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let s=e.subarray(n,n+o);if(s.length!==o)throw new r("tlv.decode: wrong value length");return{v:s,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=p;if(t<m)throw new e("integer: negative integers are not allowed");let r=(0,a.uz)(t);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){let{Err:e}=p;if(128&t[0])throw new e("invalid signature integer: negative");if(0===t[0]&&!(128&t[1]))throw new e("invalid signature integer: unnecessary leading zero");return(0,a.Hv)(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=p,i=(0,a.ql)("signature",t),{v:o,l:s}=n.decode(48,i);if(s.length)throw new e("invalid signature: left bytes after parsing");let{v:u,l:l}=n.decode(2,o),{v:h,l:f}=n.decode(2,l);if(f.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(u),s:r.decode(h)}},hexFromSig(t){let{_tlv:e,_int:r}=p,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s));return e.encode(48,n+i)}},m=BigInt(0),y=BigInt(1),g=BigInt(2),w=BigInt(3),v=BigInt(4);function b(t,e){let r;let{BYTES:n}=t;if("bigint"==typeof e)r=e;else{let i=(0,a.ql)("private key",e);try{r=t.fromBytes(i)}catch(t){throw Error(`invalid private key: expected ui8a of size ${n}, got ${typeof e}`)}}if(!t.isValidNot0(r))throw Error("invalid private key: out of range [1..N-1]");return r}function M(t){return Uint8Array.of(t?2:3)}function E(t,e){return{secretKey:e.BYTES,publicKey:1+t.BYTES,publicKeyUncompressed:1+2*t.BYTES,publicKeyHasPrefix:!0,signature:2*e.BYTES}}let x={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},A={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},B=BigInt(2),S=(0,l.gN)(x.p,{sqrt:function(t){let e=x.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),u=BigInt(88),h=t*t*t%e,f=h*h*t%e,c=(0,l.oA)(f,r,e)*f%e,d=(0,l.oA)(c,r,e)*f%e,p=(0,l.oA)(d,B,e)*h%e,m=(0,l.oA)(p,i,e)*p%e,y=(0,l.oA)(m,o,e)*m%e,g=(0,l.oA)(y,a,e)*y%e,w=(0,l.oA)(g,u,e)*g%e,v=(0,l.oA)(w,a,e)*y%e,b=(0,l.oA)(v,r,e)*f%e,M=(0,l.oA)(b,s,e)*m%e,E=(0,l.oA)(M,n,e)*h%e,A=(0,l.oA)(E,B,e);if(!S.eql(S.sqr(A),t))throw Error("Cannot find square root");return A}}),_=function(t,e){let r=e=>(function(t){let{CURVE:e,curveOpts:r,hash:n,ecdsaOpts:o}=function(t){let{CURVE:e,curveOpts:r}=function(t){let e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r=t.Fp,n=t.allowedPrivateKeyLengths?Array.from(new Set(t.allowedPrivateKeyLengths.map(t=>Math.ceil(t/2)))):void 0,i={Fp:r,Fn:(0,l.gN)(e.n,{BITS:t.nBitLength,allowedLengths:n,modFromBytes:t.wrapPrivateKey}),allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:i}}(t),n={hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:r,hash:t.hash,ecdsaOpts:n}}(t);return function(t,e){let r=e.Point;return Object.assign({},e,{ProjectivePoint:r,CURVE:Object.assign({},t,(0,l.kK)(r.Fn.ORDER,r.Fn.BITS))})}(t,function(t,e,r={}){(0,i.z3)(e),(0,a.fA)(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let n=r.randomBytes||i.O6,o=r.hmac||((t,...r)=>s(e,t,(0,i.eV)(...r))),{Fp:u,Fn:h}=t,{ORDER:d,BITS:w}=h,{keygen:v,getPublicKey:x,getSharedSecret:A,utils:B,lengths:S}=function(t,e={}){let{Fn:r}=t,n=e.randomBytes||i.O6,o=Object.assign(E(t.Fp,r),{seed:(0,l.PS)(r.ORDER)});function s(t){try{return!!b(r,t)}catch(t){return!1}}function u(t=n(o.seed)){return(0,l.Us)((0,a.GB)(t,o.seed,"seed"),r.ORDER)}function h(e,n=!0){return t.BASE.multiply(b(r,e)).toBytes(n)}function f(e){if("bigint"==typeof e)return!1;if(e instanceof t)return!0;let{secretKey:n,publicKey:i,publicKeyUncompressed:s}=o;if(r.allowedLengths||n===i)return;let u=(0,a.ql)("key",e).length;return u===i||u===s}return Object.freeze({getPublicKey:h,getSharedSecret:function(e,n,i=!0){if(!0===f(e))throw Error("first arg must be private key");if(!1===f(n))throw Error("second arg must be public key");let o=b(r,e);return t.fromHex(n).multiply(o).toBytes(i)},keygen:function(t){let e=u(t);return{secretKey:e,publicKey:h(e)}},Point:t,utils:{isValidSecretKey:s,isValidPublicKey:function(e,r){let{publicKey:n,publicKeyUncompressed:i}=o;try{let o=e.length;if(!0===r&&o!==n||!1===r&&o!==i)return!1;return!!t.fromBytes(e)}catch(t){return!1}},randomSecretKey:u,isValidPrivateKey:s,randomPrivateKey:u,normPrivateKeyToScalar:t=>b(r,t),precompute:(e=8,r=t.BASE)=>r.precompute(e,!1)},lengths:o})}(t,r),_={prehash:!1,lowS:"boolean"==typeof r.lowS&&r.lowS,format:void 0,extraEntropy:!1},I="compact";function T(t,e){if(!h.isValidNot0(e))throw Error(`invalid signature ${t}: out of range 1..Point.Fn.ORDER`);return e}class k{constructor(t,e,r){this.r=T("r",t),this.s=T("s",e),null!=r&&(this.recovery=r),Object.freeze(this)}static fromBytes(t,e=I){let r;if(!function(t,e){f(e);let r=S.signature;(0,a.GB)(t,"compact"===e?r:"recovered"===e?r+1:void 0,`${e} signature`)}(t,e),"der"===e){let{r:e,s:r}=p.toSig((0,a.GB)(t));return new k(e,r)}"recovered"===e&&(r=t[0],e="compact",t=t.subarray(1));let n=h.BYTES,i=t.subarray(0,n),o=t.subarray(n,2*n);return new k(h.fromBytes(i),h.fromBytes(o),r)}static fromHex(t,e){return this.fromBytes((0,i.nr)(t),e)}addRecoveryBit(t){return new k(this.r,this.s,t)}recoverPublicKey(e){let r=u.ORDER,{r:n,s:o,recovery:s}=this;if(null==s||![0,1,2,3].includes(s))throw Error("recovery id invalid");if(d*g<r&&s>1)throw Error("recovery id is ambiguous for h>1 curve");let l=2===s||3===s?n+d:n;if(!u.isValid(l))throw Error("recovery id 2 or 3 invalid");let f=u.toBytes(l),c=t.fromBytes((0,i.eV)(M((1&s)==0),f)),p=h.inv(l),m=U((0,a.ql)("msgHash",e)),y=h.create(-m*p),w=h.create(o*p),v=t.BASE.multiplyUnsafe(y).add(c.multiplyUnsafe(w));if(v.is0())throw Error("point at infinify");return v.assertValidity(),v}hasHighS(){return this.s>d>>y}toBytes(t=I){if(f(t),"der"===t)return(0,i.nr)(p.hexFromSig(this));let e=h.toBytes(this.r),r=h.toBytes(this.s);if("recovered"===t){if(null==this.recovery)throw Error("recovery bit must be present");return(0,i.eV)(Uint8Array.of(this.recovery),e,r)}return(0,i.eV)(e,r)}toHex(t){return(0,i.ci)(this.toBytes(t))}assertValidity(){}static fromCompact(t){return k.fromBytes((0,a.ql)("sig",t),"compact")}static fromDER(t){return k.fromBytes((0,a.ql)("sig",t),"der")}normalizeS(){return this.hasHighS()?new k(this.r,h.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,i.ci)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,i.ci)(this.toBytes("compact"))}}let O=r.bits2int||function(t){if(t.length>8192)throw Error("input is too large");let e=(0,a.Hv)(t),r=8*t.length-w;return r>0?e>>BigInt(r):e},U=r.bits2int_modN||function(t){return h.create(O(t))},R=(0,a.dQ)(w);function L(t){return(0,a.Fy)("num < 2^"+w,t,m,R),h.toBytes(t)}function P(t,r){return(0,a.GB)(t,void 0,"message"),r?(0,a.GB)(e(t),void 0,"prehashed message"):t}return Object.freeze({keygen:v,getPublicKey:x,getSharedSecret:A,utils:B,lengths:S,Point:t,sign:function(r,s,u={}){let{seed:l,k2sig:f}=function(e,r,o){if(["recovered","canonical"].some(t=>t in o))throw Error("sign() legacy options not supported");let{lowS:s,prehash:u,extraEntropy:l}=c(o,_),f=U(e=P(e,u)),p=b(h,r),g=[L(p),L(f)];if(null!=l&&!1!==l){let t=!0===l?n(S.secretKey):l;g.push((0,a.ql)("extraEntropy",t))}return{seed:(0,i.eV)(...g),k2sig:function(e){let r=O(e);if(!h.isValidNot0(r))return;let n=h.inv(r),i=t.BASE.multiply(r).toAffine(),o=h.create(i.x);if(o===m)return;let a=h.create(n*h.create(f+o*p));if(a===m)return;let u=(i.x===o?0:2)|Number(i.y&y),l=a;return s&&a>d>>y&&(l=h.neg(a),u^=1),new k(o,l,u)}}}(r=(0,a.ql)("message",r),s,u);return(0,a.n$)(e.outputLen,h.BYTES,o)(l,f)},verify:function(e,r,n,o={}){let{lowS:s,prehash:u,format:l}=c(o,_);if(n=(0,a.ql)("publicKey",n),r=P((0,a.ql)("message",r),u),"strict"in o)throw Error("options.strict was renamed to lowS");let f=void 0===l?function(t){let e;let r="string"==typeof t||(0,i._t)(t),n=!r&&null!==t&&"object"==typeof t&&"bigint"==typeof t.r&&"bigint"==typeof t.s;if(!r&&!n)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(n)e=new k(t.r,t.s);else if(r){try{e=k.fromBytes((0,a.ql)("sig",t),"der")}catch(t){if(!(t instanceof p.Err))throw t}if(!e)try{e=k.fromBytes((0,a.ql)("sig",t),"compact")}catch(t){return!1}}return!!e&&e}(e):k.fromBytes((0,a.ql)("sig",e),l);if(!1===f)return!1;try{let e=t.fromBytes(n);if(s&&f.hasHighS())return!1;let{r:i,s:o}=f,a=U(r),u=h.inv(o),l=h.create(a*u),c=h.create(i*u),d=t.BASE.multiplyUnsafe(l).add(e.multiplyUnsafe(c));if(d.is0())return!1;return h.create(d.x)===i}catch(t){return!1}},recoverPublicKey:function(t,e,r={}){let{prehash:n}=c(r,_);return e=P(e,n),k.fromBytes(t,"recovered").recoverPublicKey(e).toBytes()},Signature:k,hash:e})}(function(t,e={}){let r=(0,u.rO)("weierstrass",t,e),{Fp:n,Fn:o}=r,s=r.CURVE,{h:l,n:f}=s;(0,a.fA)(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:c}=e;if(c&&(!n.is0(s.a)||"bigint"!=typeof c.beta||!Array.isArray(c.basises)))throw Error('invalid endo: expected "beta": bigint and "basises": array');let d=E(n,o);function p(){if(!n.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let g=e.toBytes||function(t,e,r){let{x:o,y:s}=e.toAffine(),u=n.toBytes(o);if((0,a.po)(r,"isCompressed"),!r)return(0,i.eV)(Uint8Array.of(4),u,n.toBytes(s));{p();let t=!n.isOdd(s);return(0,i.eV)(M(t),u)}},x=e.fromBytes||function(t){(0,a.GB)(t,void 0,"Point");let{publicKey:e,publicKeyUncompressed:r}=d,i=t.length,o=t[0],s=t.subarray(1);if(i===e&&(2===o||3===o)){let t;let e=n.fromBytes(s);if(!n.isValid(e))throw Error("bad point: is not on curve, wrong x");let r=A(e);try{t=n.sqrt(r)}catch(t){throw Error("bad point: is not on curve, sqrt error"+(t instanceof Error?": "+t.message:""))}return p(),(1&o)==1!==n.isOdd(t)&&(t=n.neg(t)),{x:e,y:t}}if(i===r&&4===o){let t=n.BYTES,e=n.fromBytes(s.subarray(0,t)),r=n.fromBytes(s.subarray(t,2*t));if(!B(e,r))throw Error("bad point: is not on curve");return{x:e,y:r}}throw Error(`bad point: got length ${i}, expected compressed=${e} or uncompressed=${r}`)};function A(t){let e=n.sqr(t),r=n.mul(e,t);return n.add(n.add(r,n.mul(t,s.a)),s.b)}function B(t,e){let r=n.sqr(e),i=A(t);return n.eql(r,i)}if(!B(s.Gx,s.Gy))throw Error("bad curve params: generator point");let S=n.mul(n.pow(s.a,w),v),_=n.mul(n.sqr(s.b),BigInt(27));if(n.is0(n.add(S,_)))throw Error("bad curve params: a or b");function I(t,e,r=!1){if(!n.isValid(e)||r&&n.is0(e))throw Error(`bad point coordinate ${t}`);return e}function T(t){if(!(t instanceof L))throw Error("ProjectivePoint expected")}function k(t){if(!c||!c.basises)throw Error("no endo");return function(t,e,r){let[[n,i],[o,s]]=e,u=h(s*t,r),l=h(-i*t,r),f=t-u*n-l*o,c=-u*i-l*s,d=f<m,p=c<m;d&&(f=-f),p&&(c=-c);let g=(0,a.dQ)(Math.ceil((0,a.Dd)(r)/2))+y;if(f<m||f>=g||c<m||c>=g)throw Error("splitScalar (endomorphism): failed, k="+t);return{k1neg:d,k1:f,k2neg:p,k2:c}}(t,c.basises,o.ORDER)}let O=(0,a.H9)((t,e)=>{let{X:r,Y:i,Z:o}=t;if(n.eql(o,n.ONE))return{x:r,y:i};let s=t.is0();null==e&&(e=s?n.ONE:n.inv(o));let a=n.mul(r,e),u=n.mul(i,e),l=n.mul(o,e);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(l,n.ONE))throw Error("invZ was invalid");return{x:a,y:u}}),U=(0,a.H9)(t=>{if(t.is0()){if(e.allowInfinityPoint&&!n.is0(t.Y))return;throw Error("bad point: ZERO")}let{x:r,y:i}=t.toAffine();if(!n.isValid(r)||!n.isValid(i))throw Error("bad point: x or y not field elements");if(!B(r,i))throw Error("bad point: equation left != right");if(!t.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function R(t,e,r,i,o){return r=new L(n.mul(r.X,t),r.Y,r.Z),e=(0,u.xg)(i,e),r=(0,u.xg)(o,r),e.add(r)}class L{constructor(t,e,r){this.X=I("x",t),this.Y=I("y",e,!0),this.Z=I("z",r),Object.freeze(this)}static CURVE(){return s}static fromAffine(t){let{x:e,y:r}=t||{};if(!t||!n.isValid(e)||!n.isValid(r))throw Error("invalid affine point");if(t instanceof L)throw Error("projective point not allowed");return n.is0(e)&&n.is0(r)?L.ZERO:new L(e,r,n.ONE)}static fromBytes(t){let e=L.fromAffine(x((0,a.GB)(t,void 0,"point")));return e.assertValidity(),e}static fromHex(t){return L.fromBytes((0,a.ql)("pointHex",t))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(t=8,e=!0){return z.createCache(this,t),e||this.multiply(w),this}assertValidity(){U(this)}hasEvenY(){let{y:t}=this.toAffine();if(!n.isOdd)throw Error("Field doesn't support isOdd");return!n.isOdd(t)}equals(t){T(t);let{X:e,Y:r,Z:i}=this,{X:o,Y:s,Z:a}=t,u=n.eql(n.mul(e,a),n.mul(o,i)),l=n.eql(n.mul(r,a),n.mul(s,i));return u&&l}negate(){return new L(this.X,n.neg(this.Y),this.Z)}double(){let{a:t,b:e}=s,r=n.mul(e,w),{X:i,Y:o,Z:a}=this,u=n.ZERO,l=n.ZERO,h=n.ZERO,f=n.mul(i,i),c=n.mul(o,o),d=n.mul(a,a),p=n.mul(i,o);return p=n.add(p,p),h=n.mul(i,a),h=n.add(h,h),u=n.mul(t,h),l=n.mul(r,d),l=n.add(u,l),u=n.sub(c,l),l=n.add(c,l),l=n.mul(u,l),u=n.mul(p,u),h=n.mul(r,h),d=n.mul(t,d),p=n.sub(f,d),p=n.mul(t,p),p=n.add(p,h),h=n.add(f,f),f=n.add(h,f),f=n.add(f,d),f=n.mul(f,p),l=n.add(l,f),d=n.mul(o,a),d=n.add(d,d),f=n.mul(d,p),u=n.sub(u,f),h=n.mul(d,c),h=n.add(h,h),new L(u,l,h=n.add(h,h))}add(t){T(t);let{X:e,Y:r,Z:i}=this,{X:o,Y:a,Z:u}=t,l=n.ZERO,h=n.ZERO,f=n.ZERO,c=s.a,d=n.mul(s.b,w),p=n.mul(e,o),m=n.mul(r,a),y=n.mul(i,u),g=n.add(e,r),v=n.add(o,a);g=n.mul(g,v),v=n.add(p,m),g=n.sub(g,v),v=n.add(e,i);let b=n.add(o,u);return v=n.mul(v,b),b=n.add(p,y),v=n.sub(v,b),b=n.add(r,i),l=n.add(a,u),b=n.mul(b,l),l=n.add(m,y),b=n.sub(b,l),f=n.mul(c,v),l=n.mul(d,y),f=n.add(l,f),l=n.sub(m,f),f=n.add(m,f),h=n.mul(l,f),m=n.add(p,p),m=n.add(m,p),y=n.mul(c,y),v=n.mul(d,v),m=n.add(m,y),y=n.sub(p,y),y=n.mul(c,y),v=n.add(v,y),p=n.mul(m,v),h=n.add(h,p),p=n.mul(b,v),l=n.mul(g,l),l=n.sub(l,p),p=n.mul(g,m),f=n.mul(b,f),new L(l,h,f=n.add(f,p))}subtract(t){return this.add(t.negate())}is0(){return this.equals(L.ZERO)}multiply(t){let r,n;let{endo:i}=e;if(!o.isValidNot0(t))throw Error("invalid scalar: out of range");let s=t=>z.cached(this,t,t=>(0,u.A1)(L,t));if(i){let{k1neg:e,k1:o,k2neg:a,k2:u}=k(t),{p:l,f:h}=s(o),{p:f,f:c}=s(u);n=h.add(c),r=R(i.beta,l,f,e,a)}else{let{p:e,f:i}=s(t);r=e,n=i}return(0,u.A1)(L,[r,n])[0]}multiplyUnsafe(t){let{endo:r}=e;if(!o.isValid(t))throw Error("invalid scalar: out of range");if(t===m||this.is0())return L.ZERO;if(t===y)return this;if(z.hasCache(this))return this.multiply(t);if(!r)return z.unsafe(this,t);{let{k1neg:e,k1:n,k2neg:i,k2:o}=k(t),{p1:s,p2:a}=(0,u.N6)(L,this,n,o);return R(r.beta,s,a,e,i)}}multiplyAndAddUnsafe(t,e,r){let n=this.multiplyUnsafe(e).add(t.multiplyUnsafe(r));return n.is0()?void 0:n}toAffine(t){return O(this,t)}isTorsionFree(){let{isTorsionFree:t}=e;return l===y||(t?t(L,this):z.unsafe(this,f).is0())}clearCofactor(){let{clearCofactor:t}=e;return l===y?this:t?t(L,this):this.multiplyUnsafe(l)}isSmallOrder(){return this.multiplyUnsafe(l).is0()}toBytes(t=!0){return(0,a.po)(t,"isCompressed"),this.assertValidity(),g(L,this,t)}toHex(t=!0){return(0,i.ci)(this.toBytes(t))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(t=!0){return this.toBytes(t)}_setWindowSize(t){this.precompute(t)}static normalizeZ(t){return(0,u.A1)(L,t)}static msm(t,e){return(0,u.D1)(L,o,t,e)}static fromPrivateKey(t){return L.BASE.multiply(b(o,t))}}L.BASE=new L(s.Gx,s.Gy,n.ONE),L.ZERO=new L(n.ZERO,n.ONE,n.ZERO),L.Fp=n,L.Fn=o;let P=o.BITS,z=new u.Mx(L,e.endo?Math.ceil(P/2):P);return L.BASE.precompute(8),L}(e,r),n,o))})({...t,hash:e});return{...r(e),create:r}}({...x,Fp:S,lowS:!0,endo:A},n.JQ)},99026:function(t,e,r){"use strict";r.d(e,{Dd:function(){return v},EQ:function(){return x},Fy:function(){return w},GB:function(){return a},H9:function(){return A},HV:function(){return y},Hv:function(){return h},S5:function(){return d},Wd:function(){return m},dQ:function(){return b},fA:function(){return E},n$:function(){return M},po:function(){return s},ql:function(){return p},tL:function(){return c},ty:function(){return f},uz:function(){return u}});var n=r(69898);let i=BigInt(0),o=BigInt(1);function s(t,e=""){if("boolean"!=typeof t)throw Error((e&&`"${e}"`)+"expected boolean, got type="+typeof t);return t}function a(t,e,r=""){let i=(0,n._t)(t),o=t?.length,s=void 0!==e;if(!i||s&&o!==e)throw Error((r&&`"${r}" `)+"expected Uint8Array"+(s?` of length ${e}`:"")+", got "+(i?`length=${o}`:`type=${typeof t}`));return t}function u(t){let e=t.toString(16);return 1&e.length?"0"+e:e}function l(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return""===t?i:BigInt("0x"+t)}function h(t){return l((0,n.ci)(t))}function f(t){return(0,n.gk)(t),l((0,n.ci)(Uint8Array.from(t).reverse()))}function c(t,e){return(0,n.nr)(t.toString(16).padStart(2*e,"0"))}function d(t,e){return c(t,e).reverse()}function p(t,e,r){let i;if("string"==typeof e)try{i=(0,n.nr)(e)}catch(e){throw Error(t+" must be hex string or Uint8Array, cause: "+e)}else if((0,n._t)(e))i=Uint8Array.from(e);else throw Error(t+" must be hex string or Uint8Array");let o=i.length;if("number"==typeof r&&o!==r)throw Error(t+" of length "+r+" expected, got "+o);return i}function m(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r}function y(t){return Uint8Array.from(t)}let g=t=>"bigint"==typeof t&&i<=t;function w(t,e,r,n){if(!(g(e)&&g(r)&&g(n))||!(r<=e)||!(e<n))throw Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function v(t){let e;for(e=0;t>i;t>>=o,e+=1);return e}let b=t=>(o<<BigInt(t))-o;function M(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let i=t=>new Uint8Array(t),o=t=>Uint8Array.of(t),s=i(t),a=i(t),u=0,l=()=>{s.fill(1),a.fill(0),u=0},h=(...t)=>r(a,s,...t),f=(t=i(0))=>{a=h(o(0),t),s=h(),0!==t.length&&(a=h(o(1),t),s=h())},c=()=>
1{if(u++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t<e;){let e=(s=h()).slice();r.push(e),t+=s.length}return(0,n.eV)(...r)};return(t,e)=>{let r;for(l(),f(t);!(r=e(c()));)f();return l(),r}}function E(t,e,r={}){if(!t||"object"!=typeof t)throw Error("expected valid options object");function n(e,r,n){let i=t[e];if(n&&void 0===i)return;let o=typeof i;if(o!==r||null===i)throw Error(`param "${e}" is invalid: expected ${r}, got ${o}`)}Object.entries(e).forEach(([t,e])=>n(t,e,!1)),Object.entries(r).forEach(([t,e])=>n(t,e,!0))}let x=()=>{throw Error("not implemented")};function A(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(void 0!==i)return i;let o=t(r,...n);return e.set(r,o),o}}},53913:function(t,e,r){"use strict";r.d(e,{$p:function(){return f},EP:function(){return c},FL:function(){return h},Fn:function(){return w},IH:function(){return y},Iq:function(){return a},NI:function(){return s},Ou:function(){return l},SD:function(){return p},Vl:function(){return o},Xb:function(){return v},ac:function(){return g},gm:function(){return d},m_:function(){return u},mk:function(){return m},pp:function(){return E},u8:function(){return b},zP:function(){return M}});let n=BigInt(4294967296-1),i=BigInt(32);function o(t,e=!1){let r=t.length,o=new Uint32Array(r),s=new Uint32Array(r);for(let a=0;a<r;a++){let{h:r,l:u}=function(t,e=!1){return e?{h:Number(t&n),l:Number(t>>i&n)}:{h:0|Number(t>>i&n),l:0|Number(t&n)}}(t[a],e);[o[a],s[a]]=[r,u]}return[o,s]}let s=(t,e,r)=>t>>>r,a=(t,e,r)=>t<<32-r|e>>>r,u=(t,e,r)=>t>>>r|e<<32-r,l=(t,e,r)=>t<<32-r|e>>>r,h=(t,e,r)=>t<<64-r|e>>>r-32,f=(t,e,r)=>t>>>r-32|e<<64-r,c=(t,e,r)=>t<<r|e>>>32-r,d=(t,e,r)=>e<<r|t>>>32-r,p=(t,e,r)=>e<<r-32|t>>>64-r,m=(t,e,r)=>t<<r-32|e>>>64-r;function y(t,e,r,n){let i=(e>>>0)+(n>>>0);return{h:t+r+(i/4294967296|0)|0,l:0|i}}let g=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),w=(t,e,r,n)=>e+r+n+(t/4294967296|0)|0,v=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),b=(t,e,r,n,i)=>e+r+n+i+(t/4294967296|0)|0,M=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),E=(t,e,r,n,i,o)=>e+r+n+i+o+(t/4294967296|0)|0},31565:function(t,e,r){"use strict";r.d(e,{JQ:function(){return g},o:function(){return w}});var n=r(69898);class i extends n.kb{constructor(t,e,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=(0,n.GL)(this.buffer)}update(t){(0,n.$h)(this),t=(0,n.O0)(t),(0,n.gk)(t);let{view:e,buffer:r,blockLen:i}=this,o=t.length;for(let s=0;s<o;){let a=Math.min(i-this.pos,o-s);if(a===i){let e=(0,n.GL)(t);for(;i<=o-s;s+=i)this.process(e,s);continue}r.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.$h)(this),(0,n.eB)(t,this),this.finished=!0;let{buffer:e,view:r,blockLen:i,isLE:o}=this,{pos:s}=this;e[s++]=128,(0,n.ru)(this.buffer.subarray(s)),this.padOffset>i-s&&(this.process(r,0),s=0);for(let t=s;t<i;t++)e[t]=0;!function(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);let i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,l=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+l,a,n)}(r,i-8,BigInt(8*this.length),o),this.process(r,0);let a=(0,n.GL)(t),u=this.outputLen;if(u%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=u/4,h=this.get();if(l>h.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;t<l;t++)a.setUint32(4*t,h[t],o)}digest(){let{buffer:t,outputLen:e}=this;this.digestInto(t);let r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=i,t.length=n,t.pos=s,n%e&&t.buffer.set(r),t}clone(){return this._cloneInto()}}let o=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),s=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var a=r(53913);let u=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
vendor: 2,085 bytes, line 1
1734187,3204031479,3329325298]),l=new Uint32Array(64);class h extends i{constructor(t=32){super(64,t,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4],this.F=0|o[5],this.G=0|o[6],this.H=0|o[7]}get(){let{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)l[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){let e=l[t-15],r=l[t-2],i=(0,n.np)(e,7)^(0,n.np)(e,18)^e>>>3,o=(0,n.np)(r,17)^(0,n.np)(r,19)^r>>>10;l[t]=o+l[t-7]+i+l[t-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:h,G:f,H:c}=this;for(let t=0;t<64;t++){var d,p,m,y;let e=c+((0,n.np)(a,6)^(0,n.np)(a,11)^(0,n.np)(a,25))+((d=a)&h^~d&f)+u[t]+l[t]|0,g=((0,n.np)(r,2)^(0,n.np)(r,13)^(0,n.np)(r,22))+((p=r)&(m=i)^p&(y=o)^m&y)|0;c=f,f=h,h=a,a=s+e|0,s=o,o=i,i=r,r=e+g|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,h=h+this.F|0,f=f+this.G|0,c=c+this.H|0,this.set(r,i,o,s,a,h,f,c)}roundClean(){(0,n.ru)(l)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.ru)(this.buffer)}}let f=a.Vl(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
15771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),c=f[0],d=f[1],p=new Uint32Array(80),m=new Uint32Array(80);class y extends i{constructor(t=64){super(128,t,16,!1),this.Ah=0|s[0],this.Al=0|s[1],this.Bh=0|s[2],this.Bl=0|s[3],this.Ch=0|s[4],this.Cl=0|s[5],this.Dh=0|s[6],this.Dl=0|s[7],this.Eh=0|s[8],this.El=0|s[9],this.Fh=0|s[10],this.Fl=0|s[11],this.Gh=0|s[12],this.Gl=0|s[13],this.Hh=0|s[14],this.Hl=0|s[15]}get(){let{Ah:t,Al:e,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:u,El:l,Fh:h,Fl:f,Gh:c,Gl:d,Hh:p,Hl:m}=this;return[t,e,r,n,i,o,s,a,u,l,h,f,c,d,p,m]}set(t,e,r,n,i,o,s,a,u,l,h,f,c,d,p,m){this.Ah=0|t,this.Al=0|e,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|u,this.El=0|l,this.Fh=0|h,this.Fl=0|f,this.Gh=0|c,this.Gl=0|d,this.Hh=0|p,this.Hl=0|m}process(t,e){for(let r=0;r<16;r++,e+=4)p[r]=t.getUint32(e),m[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){let e=0|p[t-15],r=0|m[t-15],n=a.m_(e,r,1)^a.m_(e,r,8)^a.NI(e,r,7),i=a.Ou(e,r,1)^a.Ou(e,r,8)^a.Iq(e,r,7),o=0|p[t-2],s=0|m[t-2],u=a.m_(o,s,19)^a.FL(o,s,61)^a.NI(o,s,6),l=a.Ou(o,s,19)^a.$p(o,s,61)^a.Iq(o,s,6),h=a.Xb(i,l,m[t-7],m[t-16]),f=a.u8(h,n,u,p[t-7],p[t-16]);p[t]=0|f,m[t]=0|h}let{Ah:r,Al:n,Bh:i,Bl:o,Ch:s,Cl:u,Dh:l,Dl:h,Eh:f,El:y,Fh:g,Fl:w,Gh:v,Gl:b,Hh:M,Hl:E}=this;for(let t=0;t<80;t++){let e=a.m_(f,y,14)^a.m_(f,y,18)^a.FL(f,y,41),x=a.Ou(f,y,14)^a.Ou(f,y,18)^a.$p(f,y,41),A=f&g^~f&v,B=y&w^~y&b,S=a.zP(E,x,B,d[t],m[t]),_=a.pp(S,M,e,A,c[t],p[t]),I=0|S,T=a.m_(r,n,28)^a.FL(r,n,34)^a.FL(r,n,39),k=a.Ou(r,n,28)^a.$p(r,n,34)^a.$p(r,n,39),O=r&i^r&s^i&s,U=n&o^n&u^o&u;M=0|v,E=0|b,v=0|g,b=0|w,g=0|f,w=0|y,({h:f,l:y}=a.IH(0|l,0|h,0|_,0|I)),l=0|s,h=0|u,s=0|i,u=0|o,i=0|r,o=0|n;let R=a.ac(I,k,U);r=a.Fn(R,_,T,O),n=0|R}({h:r,l:n}=a.IH(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:o}=a.IH(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:u}=a.IH(0|this.Ch,0|this.Cl,0|s,0|u)),({h:l,l:h}=a.IH(0|this.Dh,0|this.Dl,0|l,0|h)),({h:f,l:y}=a.IH(0|this.Eh,0|this.El,0|f,0|y)),({h:g,l:w}=a.IH(0|this.Fh,0|this.Fl,0|g,0|w)),({h:v,l:b}=a.IH(0|this.Gh,0|this.Gl,0|v,0|b)),({h:M,l:E}=a.IH(0|this.Hh,0|this.Hl,0|M,0|E)),this.set(r,n,i,o,s,u,l,h,f,y,g,w,v,b,M,E)}roundClean(){(0,n.ru)(p,m)}destroy(){(0,n.ru)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let g=(0,n.V1)(()=>new h),w=(0,n.V1)(()=>new y)},97250:function(t,e,r){"use strict";r.d(e,{JQ:function(){return n}});let n=r(31565).JQ},99322:function(t,e,r){"use strict";r.d(e,{fr:function(){return b}});var n=r(53913),i=r(69898);let o=BigInt(0),s=BigInt(1),a=BigInt(2),u=BigInt(7),l=BigInt(256),h=BigInt(113),f=[],c=[],d=[];for(let t=0,e=s,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],f.push(2*(5*n+r)),c.push((t+1)*(t+2)/2%64);let i=o;for(let t=0;t<7;t++)(e=(e<<s^(e>>u)*h)%l)&a&&(i^=s<<(s<<BigInt(t))-s);d.push(i)}let p=(0,n.Vl)(d,!0),m=p[0],y=p[1],g=(t,e,r)=>r>32?(0,n.SD)(t,e,r):(0,n.EP)(t,e,r),w=(t,e,r)=>r>32?(0,n.mk)(t,e,r):(0,n.gm)(t,e,r);class v extends i.kb{constructor(t,e,r,n=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=o,(0,i.k8)(r),!(0<t&&t<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,i.Jq)(this.state)}clone(){return this._cloneInto()}keccak(){(0,i.Ux)(this.state32),function(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=g(o,s,1)^r[n],u=w(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){let n=c[r],o=g(e,i,n),s=w(e,i,n),a=f[r];e=t[a],i=t[a+1],t[a]=o,t[a+1]=s}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=m[n],t[1]^=y[n]}(0,i.ru)(r)}(this.state32,this.rounds),(0,i.Ux)(this.state32),this.posOut=0,this.pos=0}update(t){(0,i.$h)(this),t=(0,i.O0)(t),(0,i.gk)(t);let{blockLen:e,state:r}=this,n=t.length;for(let i=0;i<n;){let o=Math.min(e-this.pos,n-i);for(let e=0;e<o;e++)r[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,(128&e)!=0&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){(0,i.$h)(this,!1),(0,i.gk)(t),this.finish();let e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,i.k8)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,i.eB)(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.ru)(this.state)}_cloneInto(t){let{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new v(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}let b=(0,i.V1)(()=>new v(136,1,32))},69898:function(t,e,r){"use strict";r.d(e,{kb:function(){return A},gk:function(){return s},$h:function(){return u},z3:function(){return a},k8:function(){return o},eB:function(){return l},ci:function(){return g},ru:function(){return f},eV:function(){return x},V1:function(){return B},GL:function(){return c},nr:function(){return b},_t:function(){return i},O6:function(){return S},np:function(){return d},Ux:function(){return p},O0:function(){return E},Jq:function(){return h},iY:function(){return M}});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function i(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function o(t){if(!Number.isSafeInteger(t)||t<0)throw Error("positive integer expected, got "+t)}function s(t,...e){if(!i(t))throw Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw Error("Uint8Array expected of length "+e+", got length="+t.length)}function a(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.createHasher");o(t.outputLen),o(t.blockLen)}function u(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function l(t,e){s(t);let r=e.outputLen;if(t.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}function h(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function f(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function c(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function d(t,e){return t<<32-e|t>>>e}let p=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]?t=>t:function(t){for(let r=0;r<t.length;r++){var e;t[r]=(e=t[r])<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}return t},m="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,y=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function g(t){if(s(t),m)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=y[t[r]];return e}let w={_0:48,_9:57,A:65,F:70,a:97,f:102};function v(t){return t>=w._0&&t<=w._9?t-w._0:t>=w.A&&t<=w.F?t-(w.A-10):t>=w.a&&t<=w.f?t-(w.a-10):void 0}function b(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);
1if(m)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){let r=v(t.charCodeAt(i)),o=v(t.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(t[i]+t[i+1])+'" at index '+i);n[e]=16*r+o}return n}function M(t){if("string"!=typeof t)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function E(t){return"string"==typeof t&&(t=M(t)),s(t),t}function x(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];s(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}class A{}function B(t){let e=e=>t().update(E(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function S(t=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(t));if(n&&"function"==typeof n.randomBytes)return Uint8Array.from(n.randomBytes(t));throw Error("crypto.getRandomValues must be defined")}},59440:function(t,e,r){"use strict";function n([t,e]){return`${t}=${function t(e){return Array.isArray(e)?"%5B"+e.map(t).join("%2C%20")+"%5D":"bigint"==typeof e?`${e}n`:encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?{...e}:e))}(e)}`}r.d(e,{GH:function(){return f},bP:function(){return l}});var i,o=class extends Error{cause=this.cause;context;constructor(...[t,e]){let r,i;if(e){let{cause:t,...n}=e;t&&(i={cause:t}),Object.keys(n).length>0&&(r=n)}super(function(t,e={}){{let r=`Solana error #${t}; Decode this error by running \`npx @solana/errors decode -- ${t}`;return Object.keys(e).length&&(r+=` '${btoa(Object.entries(e).map(n).join("&"))}'`),`${r}\``}}(t,r),i),this.context={__code:t,...r},this.name="SolanaError"}};function s(t){return"fixedSize"in t&&"number"==typeof t.fixedSize}var a=((i=a||{})[i.Little=0]="Little",i[i.Big=1]="Big",i);function u(t){return t?.endian!==1}var l=(t={})=>{var e,r;return Object.freeze({...r={fixedSize:(e={config:t,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,e,r)=>t.setBigUint64(0,BigInt(e),r),size:8}).size,write(t,r,n){e.range&&function(t,e,r,n){if(n<e||n>r)throw new o(8078011,{codecDescription:t,max:r,min:e,value:n})}(e.name,e.range[0],e.range[1],t);let i=new ArrayBuffer(e.size);return e.set(new DataView(i),t,u(e.config)),r.set(new Uint8Array(i),n),n+e.size}},encode:t=>{let e=new Uint8Array("fixedSize"in r?r.fixedSize:r.getSizeFromValue(t));return r.write(t,e,0),e}})},h=(t={})=>{var e,r;return Object.freeze({...r={fixedSize:(e={config:t,get:(t,e)=>t.getBigUint64(0,e),name:"u64",size:8}).size,read(t,r=0){!function(t,e,r=0){if(e.length-r<=0)throw new o(8078e3,{codecDescription:t})}(e.name,t,r),function(t,e,r,n=0){let i=r.length-n;if(i<e)throw new o(8078001,{bytesLength:i,codecDescription:t,expected:e})}(e.name,e.size,t,r);let n=new DataView(function(t,e,r){let n=t.byteOffset+(e??0),i=r??t.byteLength;return t.buffer.slice(n,n+i)}(t,r,e.size));return[e.get(n,u(e.config)),r+e.size]}},decode:(t,e=0)=>r.read(t,e)[0]})},f=(t={})=>(function(t,e){if(s(t)!==s(e))throw new o(8078004);if(s(t)&&s(e)&&t.fixedSize!==e.fixedSize)throw new o(8078005,{decoderFixedSize:e.fixedSize,encoderFixedSize:t.fixedSize});if(!s(t)&&!s(e)&&t.maxSize!==e.maxSize)throw new o(8078006,{decoderMaxSize:e.maxSize,encoderMaxSize:t.maxSize});return{...e,...t,decode:e.decode,encode:t.encode,read:e.read,write:t.write}})(l(t),h(t))},90017:function(t,e,r){"use strict";r.d(e,{v:function(){return n}});var n=r(48529);e.Z=n},53418:function(t,e,r){"use strict";r.d(e,{Ey:function(){return u},XY:function(){return s}});var n=r(52707),i=r(90017),o=class extends i.v{socket;constructor(t,e){super(),this.socket=new window.WebSocket(t,e.protocols),this.socket.onopen=()=>
vendor: 10,181 bytes, line 1
1this.emit("open"),this.socket.onmessage=t=>this.emit("message",t.data),this.socket.onerror=t=>this.emit("error",t),this.socket.onclose=t=>{this.emit("close",t.code,t.reason)}}send(t,e,r){let n=r||e;try{this.socket.send(t),n()}catch(t){n(t)}}close(t,e){this.socket.close(t,e)}addEventListener(t,e,r){this.socket.addEventListener(t,e,r)}};function s(t,e){return new o(t,e)}var a=class{encode(t){return JSON.stringify(t)}decode(t){return JSON.parse(t)}},u=class extends i.v{address;rpc_id;queue;options;autoconnect;ready;reconnect;reconnect_timer_id;reconnect_interval;max_reconnects;rest_options;current_reconnects;generate_request_id;socket;webSocketFactory;dataPack;constructor(t,e="ws://localhost:8080",{autoconnect:r=!0,reconnect:n=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...s}={},u,l){super(),this.webSocketFactory=t,this.queue={},this.rpc_id=0,this.address=e,this.autoconnect=r,this.ready=!1,this.reconnect=n,this.reconnect_timer_id=void 0,this.reconnect_interval=i,this.max_reconnects=o,this.rest_options=s,this.current_reconnects=0,this.generate_request_id=u||(()=>"number"==typeof this.rpc_id?++this.rpc_id:Number(this.rpc_id)+1),l?this.dataPack=l:this.dataPack=new a,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(t,e,r,n){return n||"object"!=typeof r||(n=r,r=null),new Promise((i,o)=>{if(!this.ready)return o(Error("socket not ready"));let s=this.generate_request_id(t,e);this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:t,params:e||void 0,id:s}),n,t=>{if(t)return o(t);this.queue[s]={promise:[i,o]},r&&(this.queue[s].timeout=setTimeout(()=>{delete this.queue[s],o(Error("reply timeout"))},r))})})}async login(t){let e=await this.call("rpc.login",t);if(!e)throw Error("authentication failed");return e}async listMethods(){return await this.call("__listMethods")}notify(t,e){return new Promise((r,n)=>{if(!this.ready)return n(Error("socket not ready"));this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:t,params:e}),t=>{if(t)return n(t);r()})})}async subscribe(t){"string"==typeof t&&(t=[t]);let e=await this.call("rpc.on",t);if("string"==typeof t&&"ok"!==e[t])throw Error("Failed subscribing to an event '"+t+"' with: "+e[t]);return e}async unsubscribe(t){"string"==typeof t&&(t=[t]);let e=await this.call("rpc.off",t);if("string"==typeof t&&"ok"!==e[t])throw Error("Failed unsubscribing from an event with: "+e);return e}close(t,e){this.socket&&this.socket.close(t||1e3,e)}setAutoReconnect(t){this.reconnect=t}setReconnectInterval(t){this.reconnect_interval=t}setMaxReconnects(t){this.max_reconnects=t}getCurrentReconnects(){return this.current_reconnects}getMaxReconnects(){return this.max_reconnects}isReconnecting(){return void 0!==this.reconnect_timer_id}willReconnect(){return this.reconnect&&(0===this.max_reconnects||this.current_reconnects<this.max_reconnects)}_connect(t,e){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(t,e),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:t})=>{t instanceof ArrayBuffer&&(t=n.Buffer.from(t).toString());try{t=this.dataPack.decode(t)}catch(t){return}if(t.notification&&this.listeners(t.notification).length){if(!Object.keys(t.params).length)return this.emit(t.notification);let e=[t.notification];if(t.params.constructor===Object)e.push(t.params);else for(let r=0;r<t.params.length;r++)e.push(t.params[r]);return Promise.resolve().then(()=>{this.emit.apply(this,e)})}if(!this.queue[t.id])return t.method?Promise.resolve().then(()=>{this.emit(t.method,t?.params)}):void 0;"error"in t=="result"in t&&this.queue[t.id].promise[1](Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[t.id].timeout&&clearTimeout(this.queue[t.id].timeout),t.error?this.queue[t.id].promise[1](t.error):this.queue[t.id].promise[0](t.result),delete this.queue[t.id]}),this.socket.addEventListener("error",t=>this.emit("error",t)),this.socket.addEventListener("close",({code:r,reason:n})=>{this.ready&&setTimeout(()=>this.emit("close",r,n),0),this.ready=!1,this.socket=void 0,1e3!==r&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)?this.reconnect_timer_id=setTimeout(()=>this._connect(t,e),this.reconnect_interval):this.reconnect&&this.max_reconnects>0&&this.current_reconnects>=this.max_reconnects&&setTimeout(()=>this.emit("max_reconnects_reached",r,n),1))})}}},78815:function(t,e,r){"use strict";r.d(e,{AG:function(){return w},G0:function(){return B},IM:function(){return M},IX:function(){return p},O7:function(){return m},Rx:function(){return v},Ue:function(){return h},Yj:function(){return d},Z_:function(){return E},_4:function(){return S},bc:function(){return x},dt:function(){return A},eE:function(){return y},i0:function(){return g},jt:function(){return b},oQ:function(){return _}});class n extends TypeError{constructor(t,e){let r;let{message:n,explanation:i,...o}=t,{path:s}=t,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...e()])}}function i(t){return"object"==typeof t&&null!=t}function o(t){return i(t)&&!Array.isArray(t)}function s(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function*a(t,e,r,n){var o;for(let a of(i(o=t)&&"function"==typeof o[Symbol.iterator]||(t=[t]),t)){let t=function(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});let{path:i,branch:o}=e,{type:a}=r,{refinement:u,message:l=`Expected a value of type \`${a}\`${u?` with refinement \`${u}\``:""}, but received: \`${s(n)}\``}=t;return{value:n,type:a,refinement:u,key:i[i.length-1],path:i,branch:o,...t,message:l}}(a,e,r,n);t&&(yield t)}}function*u(t,e,r={}){let{path:n=[],branch:o=[t],coerce:s=!1,mask:a=!1}=r,l={path:n,branch:o,mask:a};s&&(t=e.coercer(t,l));let h="valid";for(let n of e.validator(t,l))n.explanation=r.message,h="not_valid",yield[n,void 0];for(let[f,c,d]of e.entries(t,l))for(let e of u(c,d,{path:void 0===f?n:[...n,f],branch:void 0===f?o:[...o,c],coerce:s,mask:a,message:r.message}))e[0]?(h=null!=e[0].refinement?"not_refined":"not_valid",yield[e[0],void 0]):s&&(c=e[1],void 0===f?t=c:t instanceof Map?t.set(f,c):t instanceof Set?t.add(c):i(t)&&(void 0!==c||f in t)&&(t[f]=c));if("not_valid"!==h)for(let n of e.refiner(t,l))n.explanation=r.message,h="not_refined",yield[n,void 0];"valid"===h&&(yield[void 0,t])}class l{constructor(t){let{type:e,schema:r,validator:n,refiner:i,coercer:o=t=>t,entries:s=function*(){}}=t;this.type=e,this.schema=r,this.entries=s,this.coercer=o,n?this.validator=(t,e)=>a(n(t,e),e,this,t):this.validator=()=>[],i?this.refiner=(t,e)=>a(i(t,e),e,this,t):this.refiner=()=>[]}assert(t,e){return function(t,e,r){let n=f(t,e,{message:r});if(n[0])throw n[0]}(t,this,e)}create(t,e){return h(t,this,e)}is(t){return!f(t,this)[0]}mask(t,e){return function(t,e,r){let n=f(t,e,{coerce:!0,mask:!0,message:r});if(!n[0])return n[1];throw n[0]}(t,this,e)}validate(t,e={}){return f(t,this,e)}}function h(t,e,r){let n=f(t,e,{coerce:!0,message:r});if(!n[0])return n[1];throw n[0]}function f(t,e,r={}){let i=u(t,e,r),o=function(t){let{done:e,value:r}=t.next();return e?void 0:r}(i);return o[0]?[new n(o[0],function*(){for(let t of i)t[0]&&(yield t[0])}),void 0]:[void 0,o[1]]}function c(t,e){return new l({type:t,schema:null,validator:e})}function d(){return c("any",()=>!0)}function p(t){return new l({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(let[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${s(t)}`})}function m(){return c("boolean",t=>"boolean"==typeof t)}function y(t){return c("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${s(e)}`)}function g(t){let e=s(t),r=typeof t;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||`Expected the literal \`${e}\`, but received: ${s(r)}`})}function w(t){return new l({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function v(){return c("number",t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${s(t)}`)}function b(t){return new l({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function M(t,e){return new l({type:"record",schema:null,*entries(r){if(i(r))for(let n in r){let i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>o(t)||`Expected an object, but received: ${s(t)}`,coercer:t=>o(t)?{...t}:t})}function E(){return c("string",t=>"string"==typeof t||`Expected a string, but received: ${s(t)}`)}function x(t){let e=c("never",()=>!1);return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator:t=>Array.isArray(t)||`Expected an array, but received: ${s(t)}`,coercer:t=>Array.isArray(t)?t.slice():t})}function A(t){let e=Object.keys(t);return new l({type:"type",schema:t,*entries(r){if(i(r))for(let n of e)yield[n,r[n],t[n]]},validator:t=>o(t)||`Expected an object, but received: ${s(t)}`,coercer:t=>o(t)?{...t}:t})}function B(t){let e=t.map(t=>t.type).join(" | ");return new l({type:"union",schema:null,coercer(e,r){for(let n of t){let[t,i]=n.validate(e,{coerce:!0,mask:r.mask});if(!t)return i}return e},validator(r,n){let i=[];for(let e of t){let[...t]=u(r,e,n),[o]=t;if(!o[0])return[];for(let[e]of t)e&&i.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${s(r)}`,...i]}})}function S(){return c("unknown",()=>!0)}function _(t,e,r){return new l({...t,coercer:(n,i)=>f(n,e)[0]?t.coercer(n,i):t.coercer(r(n,i),i)})}}}]);

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